Lets start from simple search algorithms to more advanced.
O(n)
class Zeros { public int findZeros(int[] arr) { int count = 0; for (int i = 0; i < arr.length; i++) { if (i == 0) { count++; } } return count; } }
O(n^2)