Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

Click here to see the full article post

I would say the runtime is O(min(m,n)*log(max(m,n))

@devilhtc Would you explain why?

@devilhtc Thanks a lot!

In the binary search solution, why the answer is guaranteed to be inside the multiplication table of m*n? The table might not contain the binary search value.

Should the Approach 2 runtime be O(mnlogm)? Push pop is O(logm) rather than (mlogm)

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.