static int minOfIntArray(int[] a) { if (empty(a)) ret 0; int n = a.length, x = a[0]; for (int i = 1; i < n; i++) x = min(a[i], x); ret x; }