public static double[] Reverse(double[] Arr){
       double[] temp = new double[Arr.length];
       for(int i=0;i<Arr.length;i++){
           temp[i]=Arr[Arr.length-1-i];
       }
       return temp;
    }