You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The overall run time complexity should be O(log (m+n)).
One of the algorithms with logarithmic time complexity is binary search, and binary search can only be used with sorted lists.
So we can use the binary search in this problem.