MediumBinary Search
Find First and Last Position
Find range of target in sorted array
Solution Approach
Two binary searches
Complexity Analysis
Time Complexity
O(log n)Space Complexity
O(1)Complexity
Time:O(log n)
Space:O(1)
Asked at
GoogleMicrosoft