Java Array Max Value maxSort(double[] arr)

Here you can find the source of maxSort(double[] arr)

Description

max Sort

License

Open Source License

Declaration

public static double[] maxSort(double[] arr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double[] maxSort(double[] arr) {
        double[] sortArray = arr;
        for (int i = 0; i < sortArray.length - 1; i++) {
            for (int j = 0; j < sortArray.length - 1; j++) {
                if (sortArray[j] < sortArray[j + 1]) {
                    double temp = sortArray[j];
                    sortArray[j] = sortArray[j + 1];
                    sortArray[j + 1] = temp;
                }/*from  w  w  w . j  ava 2s  .co m*/
            }
        }
        return sortArray;
    }
}

Related

  1. maxPrim(final int... numbers)
  2. maxRepeating(int[] input, int k)
  3. maxRow(Object[]... arr)
  4. maxRowLen(Object[]... arr)
  5. maxSize(String[] string)
  6. maxStartFromIndex(double[] array, int startFromIndex)
  7. maxSum(int[] array)
  8. maxValue(double[] ary)
  9. maxValue(double[] from)