1 1 vote time complexity for merging m sorted lists, each with n/m elements Algorithms time-complexity merge-sort + – mounika kothuri 710 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
3 3 votes o(nlog(n/m)) Nachiket Karambelkar answered Feb 23, 2016 Nachiket Karambelkar comment Share Follow See 1 comment 1 1 comment reply sachin486 commented Jan 6, 2021 reply Follow flag who gave three upvotes to a wrong answer…. m list with n/m elements each, total number of element = n means at each level of recursion tress n elements will be compare so comparision complexity at each level O(n)*number of level or height m list will give tree of height log(m) so complexity = nlog(m) 0 0 replyShare Please log in or register to add a comment.
1 1 vote merging of m sorted list It will be like merge sort complexity O(n/m log(n/m)) srestha answered Mar 30, 2016 srestha comment Share Follow 0 reply Please log in or register to add a comment.