Skip to content

Commit 7b29020

Browse files
authored
Update SearchInInfiniteSortedArray.java
1 parent bb2f1fb commit 7b29020

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

GeeksForGeeks/SearchInInfiniteSortedArray.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ static int ans(int nums[],int target){
1919

2020
return infiniteArray(nums,target,start,end);
2121
}
22+
//once we find the start and end of the range by above function we can apply normal binary search and find the position of given element;
23+
//if the target element is not there in the array the funcion will return -1;
2224
static int infiniteArray(int nums[],int target,int start ,int end){
2325

2426

0 commit comments

Comments
 (0)