• retagged by
890 views
1 1 vote
Consider the following sequence of letters (Assume always select last element as pivot and array index starts with 0)
Q, U, I, C, K, S, O, R, T, E, X, A, M, P, L, E

What is the position of pivot element after completion of first pass?

1 Answer

Best answer
2 2 votes

No need of applying quick sort here :

Q, U, I, (C), K, S, O, R, T, (E), X, (A), M, P, L, E 

After 1st pass E is is come at its correct place :

ACEE 

4rth possition or 3rd index.

• selected by
Position:
Show:

Related questions

2 2 votes
8 answers 8 answers
5.7k
5.7k views
1 1 vote
1 answers 1 answer
2.5k
2.5k views
GateAspirant999 asked May 19, 2016
2,463 views
Is below question and its answer correct? Or its just kind of rubbish?After one pass through the partition procedure of quick sort array stand as below:2,1,4,5,9,7,8,10H...
3 3 votes
1 1 answer
208
208 views
GO Classes asked Aug 31
208 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
140
140 views
GO Classes asked Aug 10
140 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...