Skip to content

Instantly share code, notes, and snippets.

/**
* 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++){
/**
* 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];
/**
* 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;
}