DSA-Bootcamp-Java
DSA-Bootcamp-Java copied to clipboard
Update InfiniteArray.java
if the target is larger than the largest element in the array it will not lie between the last range and when the while loop run again it will compare the target with the unexisting index of the array and will through index out of bond error.
If target is lie in array but due to end pointer points to unexisting index of array then we have to move end pointer to last element of array i.e end = arr.lengtn -1 .
