The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
Recent questions tagged quicksort
+9
votes
1
answer
1
TIFR2018B7
Consider the recursive quicksort algorithm with "random pivoting". That is, in each recursive call, a pivot is chosen uniformly at random from the subarray being sorted.When this randomized algorithm is applied to an array of size $n$ all whose elements are distinct, what is the probability ... ${O} \left(\dfrac{1}{n^{2}}\right)$ $\Theta\left(\dfrac{1}{n \log^{2} n}\right)$
asked
Dec 10, 2017
in
Algorithms
by
Arjun
Veteran
(
425k
points)

500
views
tifr2018
algorithms
sorting
quicksort
0
votes
0
answers
2
Quick Sort Number Of Comparison Query
What is the number of Comparison to sort below arrays using quick sort using first element as pivot ? Please show steps . A1=4,1,5,3,2 A2=1,2,3,4,5
asked
Dec 3, 2017
in
Algorithms
by
hem chandra joshi
Active
(
4.1k
points)

632
views
quicksort
+4
votes
1
answer
3
Modified form of GATE1996_2.15
Quicksort is run on two inputs shown below to sort in ascending order taking first element as pivot i) 1,2,3,…n ii) n,n−1,n−2,…,2,1 Let S1 and S2 be the number of swaps made for the inputs (i) and (ii) respectively. Then, i) How is S1 and S2 related ? ii) How will the answer change if the pivot is changed to middle element ?
asked
Oct 18, 2017
in
Algorithms
by
rishi71662data4
Active
(
2.7k
points)

322
views
algorithms
datastructure
sorting
quicksort
+1
vote
1
answer
4
QUICKSORT
Could anyone describe how the partitioning algorithm vary when the pivot is varied ? In Cormen , last element is taken as pivot . Suppose I took first element or middle element or 3 rd element as pivot then how the partitioning algorithm will change.
asked
Sep 27, 2017
in
Algorithms
by
ashwina
Active
(
1.7k
points)

160
views
algorithms
sorting
sortingalgorithmsquicksort
quicksort
+3
votes
3
answers
5
Quick Sort
"Quick sort has good cache performance" , Can anyone explain this statement.How is cache related to quick sort.I searched for this over the internet but could not find a good article.
asked
Sep 3, 2017
in
Algorithms
by
Sourajit25
Active
(
1.3k
points)

363
views
algorithms
sorting
timecomplexity
quicksort
+2
votes
1
answer
6
Quick sort
When array is already sorted in reverse order then what will be the recurrence relation for number of swaps on array of n elements using quick sort?
asked
Aug 10, 2017
in
Algorithms
by
SHALINI PORWAL
(
21
points)

368
views
algorithms
sorting
timecomplexity
quicksort
+2
votes
3
answers
7
With quick sort The results after first partioning of the given array
With quick sort The results after first partioning of the given array. A = (2,8,7,1,3,5,6,4,9). Analysis the time complexity of Quick sort in the best case.
asked
Apr 15, 2017
in
Algorithms
by
LavTheRawkstar
Active
(
3.7k
points)

249
views
algorithms
quicksort
timecomplexity
sorting
0
votes
2
answers
8
A list of elements are given A  <3,1,4,1,5,9,2,6,5,3,5,8,9 >
A list of elements are given A  <3,1,4,1,5,9,2,6,5,3,5,8,9 > Show Howw the "Pivot" and quick sort algorithm work. finally show the Best Case analysis for quick sort .
asked
Apr 15, 2017
in
Algorithms
by
LavTheRawkstar
Active
(
3.7k
points)

443
views
algorithms
quicksort
0
votes
1
answer
9
GATE 2008 Quick Sort
Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sublists each of which contains at least onefifth of the elements. Let T(n) be the number of comparisons required to sort n elements. Then A. T(n) < ... (4n/5) + n, if elements are more than (n/5)( since it is given 'AT LEAST'). Where am I going wrong?
asked
Mar 29, 2017
in
Algorithms
by
Bongbirdie
Junior
(
697
points)

481
views
quick
quicksort
algorithms
sorting
timecomplexity
+2
votes
1
answer
10
quick sort
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)
asked
Jan 20, 2017
in
Algorithms
by
dd
Veteran
(
57k
points)

625
views
algorithms
quicksort
sorting
+8
votes
1
answer
11
New Gradience Sorting
There are many variations of Quicksort. We may choose the pivot for each partition step in various ways. There are various strategies for partitioning an array segment into one subpartition of consecutive array positions that has values less than or equal to the pivot and another subpartition of consecutive array ... , 8, 9 b) 3, 1, 3, 1 c) 5, 4, 3, 3, 5 d) 1, 4, 1, 3
asked
Nov 15, 2016
in
Algorithms
by
mohit chawla
Active
(
2.6k
points)

433
views
sorting
quicksort
algorithms
+1
vote
1
answer
12
quick sort
Is quick sort inplace algorithm?
asked
Nov 7, 2016
in
Algorithms
by
vaishali jhalani
Active
(
4.7k
points)

232
views
algorithms
quicksort
sorting
0
votes
1
answer
13
Quick sort
@arjun sir why is quick sort with median as pivot not in practice even though it can sort the worst case list in O(nlogn) time? median can be found in O(n) time and this divides list into two halves. recurrance relation becomes T(n) = ... implement it bcoz "The hidden constants in this approach are high compared to normal Quicksort" but why are we caring about constants here?
asked
Nov 2, 2016
in
Algorithms
by
Anusha Motamarri
Boss
(
12k
points)

605
views
quicksort
algorithms
sorting
timecomplexity
0
votes
1
answer
14
Algorithm
asked
Oct 7, 2016
in
Algorithms
by
Rahul Jain25
Boss
(
11.1k
points)

267
views
algorithms
quicksort
+2
votes
1
answer
15
Randomised quicksort
Let us a consider a series of events where a random partition procedure always picks the median element among n distinct numbers dividing the array into two equal halves ( ignore floor and ceiling). What is the probability that such a partition procedure always picks the median element in all subsequent arrays till the entire array is sorted.
asked
Oct 4, 2016
in
Algorithms
by
vivek9837
Junior
(
835
points)

282
views
sorting
algorithms
quicksort
+1
vote
1
answer
16
quick sort
is it quick sort is inplace algorithm. according to me it takes o(logn) space in best case and as i know any algo takes more then 0(1) spcae count as not inplace algo then why quick sort is inplace plz explain clearly
asked
Jul 25, 2016
in
Algorithms
by
rajan
Loyal
(
5.6k
points)

133
views
quicksort
+1
vote
1
answer
17
quick sort time complexity
the worst case time complexity of quicksort for an elements when the median is selected as the pivot a. o(n^2) b.o(n) c.o(nlogn) d.o(logn)
asked
Mar 9, 2016
in
Algorithms
by
akankshay
(
17
points)

1.8k
views
algorithms
timecomplexity
quicksort
+3
votes
2
answers
18
Quick Sort
Consider an array with the following elements: 12, 18, 17, 11, 13, 15, 16 and 14. How many element will change their initial position after completion of partition algorithm by choosing 15 as pivot? Given Answer : 7 ( only 16 is not swapped ) My Answer : 6 ( 16 ... 13 14 12 11 15 17 16 18 So 11 and 16 are not changed all other elements have changed their position Correct me if i am wrong
asked
Jan 17, 2016
in
Algorithms
by
pC
Boss
(
21.3k
points)

484
views
algorithms
quicksort
0
votes
1
answer
19
Give the result of partitioning the keys after the 1st pass of quicksort.
THISCOURSEISOVER Choose the last elements as pivot elements (R). Also for duplicates, adopt the convention that both pointers stop. a) EHIOCOIERRUSSVTS b) EHISCOIERRUSOVTS b) EHIOCOUESRTSSVTR c) EHIOOCIERRUSSVTS
asked
Jul 22, 2015
in
Algorithms
by
Saurabh Sharma
Junior
(
567
points)

241
views
sorting
algorithms
quicksort
Page:
« prev
1
2
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
Recent Posts
Linear Algebra Important Points
GATE 2020
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
TIFR and JEST exam
Follow @csegate
Recent questions tagged quicksort
Recent Blog Comments
Amazing work Sir
Not in my hands. Flipkart is showing my location...
Arjun sir, plz provide go book through...
@
[email protected]
Can this be updated?
Even In 2019 my 16 questions goes for negative...
50,644
questions
56,505
answers
195,557
comments
101,057
users