Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int start = 0;
- int end = words.length - 1;
- while(){
- int mid = (start + end) / 2;
- if(val == words[mid]){
- return(mid);
- }else if(val != words[mid]){
- end = mid - 1;
- }
- }//while
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement