The Gateway to Computer Science Excellence
+2 votes
625 views
If we use quicksort algorithm to sort the elements: $16, 13, 14, 12, 21, 16, 23$ and $15$ in ascending order, what is the output after the first pass of quicksort? (Assume pivot element is beginning of an array)
in Algorithms by Veteran (57k points) | 625 views
0
please close if duplicate
0
13,14,12,16,15---------------16(pivot)----------------------------21,23
0
16,13,14,12,15,16,23,21
0
(15,13,14,12,16) ->16<- (23,21)
Do you want a an illustrative answer?
–1
You might find this link interesting
https://visualgo.net/sorting
0
can u tell the algo.. ..when 1st element is pivot

1 Answer

0 votes
15 13 14 12 16 -- 16 -- 23 21
by (11 points)
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
50,647 questions
56,492 answers
195,439 comments
100,698 users