SHARE
TWEET

Untitled

a guest Aug 19th, 2019 82 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top