297 views
1 votes
1 votes
Consider a single linked list there are n list containing m elements below are the following operations
i)Merging of two sorted lists has time complexity of O(m log n) whereas Merging of two unsorted lists has time complexity of
O(m + n).
ii)intersection of two sorted lists has time complexity of O(mn) whereas intersection of two unsorted lists has time complexity of O(mn).
iii) concatenation of two sorted lists has time complexity of O(m) whereas concatenation of two unsorted lists has time complexity of O(m).
which of the following is true?
a)only i
b)only i and ii
c)only i and iii
d)i,ii,iii

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Feb 25
178 views
How can we find the highest element in a singly linked list in O(1)? We are free to use any extra space.
9 votes
9 votes
2 answers
4
GO Classes asked May 4, 2022
508 views
If $f(n) = O(g(n))$ and $f(n) = \Omega(g(n)),$ then it is always true that$f(n) = o(g(n)).$$f(n) = \theta(g(n)).$$f(n) = \omega(g(n)).$both A and B are always true.