Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int lower(int a[],int n,int t)
- {
- int m,l=0,h=n-1;
- while(l<=h)
- {
- m=(l+h)/2;
- if(a[m]==t)
- {
- h=m-1;
- }
- else if(a[m]<t)l=m+1;
- else h=m-1;
- }
- return m;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement