class Solution { public: int binarySearch(vector<int> array, int target, int l, int r) { while (l <= r) { int mid = l + (r - l) / 2; if(array[mid] < target) { l = mid + 1; } else if(array[mid] > target){ r = mid - 1; } ...