Guest User

Untitled

a guest
Aug 19th, 2019
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static int linearSearch(int x, int[] arr) {
  2. int i = 0;
  3. while (arr[i] != Integer.MIN_VALUE) {
  4. if (arr[i] == x) return arr[i];
  5. i++;
  6. }
  7. return Integer.MIN_VALUE;
  8. }
RAW Paste Data