edited by
676 views
0 0 votes
In quick sorting algorithm 2 elements i and j are compared if and only if among all the elements, the element to be picked as pivot is either i or j. Is this statement true or false?

1 Answer

1 1 vote
This is true statement as once the partitions are done there is no comparison in joining. But when the pivot is choosen it is compared with whole array
Position:
Show:

Related questions

5 5 votes
1 answers 1 answer
2.5k
2.5k views
Shailin Shah asked May 23, 2018
2,465 views
Let $0<α<.5$ be some constant (independent of the input array length $n$). What is the probability that, with a randomly chosen pivot element, the Partition subroutine pr...
1 1 vote
1 1 answer
146
146 views
GO Classes asked Aug 31
146 views
During sorting, one complete processing of all elements whose final positions have not yet been determined is called a pass.Which of the following sequences cannot be the...
0 0 votes
1 1 answer
117
117 views
GO Classes asked Aug 10
117 views
Consider the Quick sort algorithm which sorts elements in ascending order using the first element as pivot. Then which of the following input sequence will require a maxi...
0 0 votes
1 1 answer
164
164 views
Udit_goyal asked May 6
164 views
1. what is the space Complexity of efficient Quick sort algorithem for best case ? in a lecture Reddy Sir Said that it is O(1) is this correct  2.if in the gate exam if t...