Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int binarySearch(int a[], int l, int r, int x){
- if(l <= r){
- int m = (l + r)/2;
- if(x == a[m]){
- return m;
- get link:https://www.file-upload.com/tk6brlec9agy
Add Comment
Please, Sign In to add comment