Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static boolean search(int[] array, int key, int lo, int hi) {
- //fuck shit fuck! these mp's take fucking FOREVER. jesus h. christ, too much shit
- //to do in one homework assignment! FUCK MY LIFE, MY FRIDAY NIGHTS != GETTING PUSSY.
- int mid = (lo + hi) / 2;
- if (array[mid] == key) return true; // found the mother fucker
- if (array[mid] > key)
- return search(array, key, mid-1, hi);
- return search(array, key, mid+1, hi);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement