Java Array Min Value findMin(int[] workArray, int idx)

Here you can find the source of findMin(int[] workArray, int idx)

Description

find Min

License

Open Source License

Declaration

public static int findMin(int[] workArray, int idx) 

Method Source Code

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

public class Main {
    public static int findMin(int[] workArray, int idx) {
        return findMin2(workArray, idx, workArray[idx]);
    }//from   w  w w  . j  a  va2 s  . c om

    private static int findMin2(int[] workArray, int idx, int min) {
        if (idx <= 0)
            return min;
        return findMin2(workArray, idx - 1, Math.min(min, workArray[idx - 1]));
    }
}

Related

  1. arrayMin(double[] arr)
  2. arrayMin(double[] x)
  3. arrayMin(final double[] array)
  4. arrayMin(int[] property)
  5. findMin(float[] array)
  6. findMin(String[] strs)
  7. findMin2(int[] workArray, int idx, int min)
  8. findMinAndMax(double[] array)
  9. findMinAndMax(float[] buffer, int pixelStride, int numBands)