this supposed check if int occurs @ specific index in array or @ other index on that. however, loop doesn't loop
public static boolean searchiterative(int[] list, int f, int x){ (; f<list.length;f++){ return list[f]==x; } return false; }
you return after entering loop. return
exits loop (and function.
Comments
Post a Comment