The Gateway to Computer Science Excellence
0 votes
112 views

The average no. of comparisons performed by the merge sort algorithm, in merging 2 sorted lists of length 2 is___________.

Ans: $\frac{8}{3}$

in Algorithms by Loyal
edited by | 112 views
+1
2.67 ?
0
How ??
+3

I'm thinking in this way.

but is it necessary to add 4th case?

+1
Nice.

No need to add the 4th case.
0

@

@ how case 2 and case 3 are different?

0
Is there any generic way for same?having n list of n elements

1 Answer

0 votes

I think answer will be 
like(total number of comarison/2)

(2+2-1)/2=1.5

by
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,218 questions
59,876 answers
201,072 comments
118,119 users