You are viewing a single comment's thread. Return to all comments →
I was ambiguous in that, I apologize. Let me rephrase below.
O(N+M), as we are checking for worse case, lets make N = the larger of N,M. Therefore O(N+M) -> O(N+N) == O(2N) == O(N).
Seems like cookies are disabled on this browser, please enable them to open this website
Merge two sorted linked lists
You are viewing a single comment's thread. Return to all comments →
I was ambiguous in that, I apologize. Let me rephrase below.
O(N+M), as we are checking for worse case, lets make N = the larger of N,M. Therefore O(N+M) -> O(N+N) == O(2N) == O(N).