Morass

Binary Search

Apr 15th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.12 KB | None | 0 0
  1. int binS(int w,int b,int e){
  2.     if(b==e)return b;
  3.     int k((b+e)>>1);
  4.     return v[k]<w?binS(w,k+1,e):binS(w,b,k);
  5. }
Advertisement
Add Comment
Please, Sign In to add comment