You are viewing a single comment's thread. Return to all comments →
Well my original analysis did not indicate that I was setting N as the larger of N and M, so in that case it's O(N+M).
If I indicated N is larger of N and M, then I could have said runtime is O(N).
Either way is fine. My runtime in my post above is consistent.
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 →
Well my original analysis did not indicate that I was setting N as the larger of N and M, so in that case it's O(N+M).
If I indicated N is larger of N and M, then I could have said runtime is O(N).
Either way is fine. My runtime in my post above is consistent.