edited by
1,090 views
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?
edited by

1 Answer

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))

Related questions

1 votes
1 votes
1 answer
1
Markzuck asked Jan 6, 2019
507 views
Please show the ideal way to deal with such comparisons as I am getting g>=f IN genral what logic shall be followed to analyse such complex comparions?
0 votes
0 votes
1 answer
2
Markzuck asked Dec 29, 2018
803 views
cant we write the recurrance relation for bar() as T(n) = 5T(n-1) + c,like cant we take both the recurrance call as combined as both have same parameter?and if not, then ...
1 votes
1 votes
0 answers
3
1 votes
1 votes
1 answer
4