problem
solution
option 1
1 | class Solution { |
1 | class Solution { |
option 2 - binary search
1 | class Solution { |
1 | class Solution { |
analysis
- time complexity
O(nlogn)
- space complexity
O(1)
1 | class Solution { |
1 | class Solution { |
1 | class Solution { |
1 | class Solution { |
O(nlogn)
O(1)