Here you can find the source of findMin(int[] workArray, int idx)
public static int findMin(int[] workArray, int idx)
//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])); } }