Computer Sciences > GATE 2026 SET-2 > Algorithms
Consider an array π΄=[10, 7, 8, 19, 41, 35, 25, 31]. Suppose the merge sort
algorithm is executed on array π΄ to sort it in increasing order. The merge sort
algorithm will carry out a total of 7 merge operations.
A merge operation on sorted left array πΏ and sorted right array π is said to be void if the output of the merge operation is the elements of array πΏ followed by the elements of array π .
The number of void merge operations among these 7 merge operations is __________. (answer in integer)
A merge operation on sorted left array πΏ and sorted right array π is said to be void if the output of the merge operation is the elements of array πΏ followed by the elements of array π .
The number of void merge operations among these 7 merge operations is __________. (answer in integer)
Correct : 3
Similar Questions
Match the following
(P) Primβs algorithm for minimum spanning tree
(i) Backtracking
(Q) Floyd-Warshall algorithm fo...
Consider the following table
Algorithms
Design Paradigms
(P) Kruskal
(i) Divide and Conquer...
Consider functions Function 1 and Function 2 expressed in pseudocode as follows:
Let f1(n) and f2(n) denote the number of times the statement "x = x + 1" is...
Total Unique Visitors
Loading......