0 votes 0 votes For merging two unsorted list of size m and n into sorted list of size (m+n). The time complexity in terms of no. of comparison for this is? Algorithms made-easy-test-series algorithms time-complexity + – Shamim Ahmed asked Nov 22, 2018 • edited Mar 4, 2019 by akash.dinkar12 Shamim Ahmed 1.1k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply soubhik baral commented Nov 22, 2018 reply Follow Share mlogm+nlogn i think as we have to first sort it then merge. 0 votes 0 votes kirtipurohit commented Jan 9, 2022 reply Follow Share But comparisons will be m+n-1 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes First, sort the lists and then merge them all together into the sorted one. Time Complexity : O (nlogn + mlogm + (n + m)) `JEET answered Nov 22, 2018 `JEET comment Share Follow See all 0 reply Please log in or register to add a comment.