daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static boolean search(int[] array, int key, int lo, int hi) {
  2.  
  3. //fuck shit fuck! these mp's take fucking FOREVER. jesus h. christ, too much shit
  4. //to do in one homework assignment! FUCK MY LIFE, MY FRIDAY NIGHTS != GETTING PUSSY.
  5.  
  6. int mid = (lo + hi) / 2;
  7.        
  8. if (array[mid] == key) return true; // found the mother fucker
  9.        
  10. if (array[mid] > key)
  11. return search(array, key, mid-1, hi);
  12. return search(array, key, mid+1, hi);
  13.        
  14. }
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
Pastebin PRO 'AUTUMN SPECIAL'!
Get 40% OFF Pastebin PRO accounts!
 
Top