This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by xynophon on 15.1.12. | |
| */ | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| public class moving_Average { | |
| // O(n^2) | |
| public void solution(double[] weights, int num_ma){ | |
| for(int cnt = 0; cnt <= weights.length-num_ma; cnt++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by xynophon on 15.1.13. | |
| */ | |
| import java.util.Random; | |
| public class sort { | |
| public double[] swap(double[] arr, int i, int j){ | |
| double temp = arr[i]; | |
| arr[i] = arr[j]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by xynophon on 15.1.13. | |
| */ | |
| import java.util.Random; | |
| public class max_sum { | |
| public double max(double i, double j){ | |
| if(i == j)return i; | |
| return (i<j)?j:i; | |
| } |
NewerOlder