2022-12-31

Which time-complexity is better O(logM + logN) or O(logM.logN)?

I tried the binary search on the 2D matrix and I got the solution which gives the time compexity to be the O(logN.logM). There exist already a solution which performs it in log(MN) time. I Only want to know which is better or less-time taking. Really a burning question.



No comments:

Post a Comment