The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
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
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions tagged sorting
0
votes
0
answers
1
#Algorithms Quicksort VS Mergesort? Which is a faster sorting algorithm
I did Google and found out that Quicksort is better then Mergesort, but my question is which is faster among both?
asked
3 hours
ago
in
Algorithms
by
iarnav
Loyal
(
9.7k
points)

4
views
algorithms
sorting
0
votes
0
answers
2
Total number of function calls in Merge sort Algorithm
In Merge sort Algorithm when I took input array of size 2 and I got 4 function calls as including original function call with which I call MS algorithm i.e. MS (1,2) and which in turn calls two recursive function calls to merge ... function calls. So, how can I analyze the total number of function calls when input array size is n? thank you!
asked
12 hours
ago
in
Algorithms
by
iarnav
Loyal
(
9.7k
points)

8
views
algorithms
mergesort
sorting
0
votes
2
answers
3
made easy test series:algorithms,sorting
why not merge sort?we don’t swap in merge sort,we just create auxillary arrays and merge them by changing elements in the original array.should we consider that as a swap?
asked
Apr 16
in
Algorithms
by
hitesh159
(
131
points)

67
views
madeeasytestseries
algorithms
sorting
0
votes
1
answer
4
Cormen Edition 3 Exercise 6.1 Question 4 (Page No. 154)
Where in a maxheap might the smallest element reside, assuming that all elements are distinct ?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.2k
points)

28
views
cormen
algorithms
sorting
heap
descriptive
0
votes
0
answers
5
Can Merge Sort Time Complexity be O(n^2) in any condition?
asked
Feb 1
in
Algorithms
by
aditykansara
(
23
points)

113
views
algorithms
timecomplexity
sorting
0
votes
1
answer
6
ME Mock 4
Consider a new sorting algorithm similar to the BubbleSort algorithm, called RumbleSort. Given an array as input, RumbleSort attempts to sort the array and produces a sorted array as output. Here's the pseudocode for RumbleSort. With regards to the above RumbleSort ... algorithm will work correctly for a given input is $\mathcal Ο(n^2)$ Which of the above statements is/are true?
asked
Jan 30
in
Algorithms
by
balchandar reddy san
Active
(
2.9k
points)

151
views
timecomplexity
algorithms
sorting
0
votes
1
answer
7
MadeEasy WorkBook: Algorithms  Sorting
Consider the following array with 7 elements for insertion sort? 25, 15, 30, 9, 99, 20, 26 In how many passes, the given sequence will be sorted? (a) 4 pass (b) 5 pass (c) 6 pass (d) More than 6 pass Answer is 6 passes. Can anyone explain it step by step.
asked
Jan 26
in
Algorithms
by
Jyoti Kumari97
(
235
points)

94
views
madeeasybooklet
algorithms
sorting
0
votes
2
answers
8
DAA: LInked list and sorted array
Suppose that two repositories exist for storing and searching through a certain type of record. The first repository uses a linked list; on average, it requires $10$ ms to search $1024$ records, or $10240$ ms to search $1048576$ records. ... two versions require approximately equal time, on average? 1. 2048 records 2. 4096 records 3. 16384 records 4. 65536 records
asked
Jan 23
in
Algorithms
by
chauhansunil20th
Active
(
4.9k
points)

77
views
algorithms
linkedlists
sorting
0
votes
0
answers
9
Merge sort
What is the extra memory needed for merge sort: 1] In case of Iterative merge sort.(DS:Array) 2]In case of Recursive merge sort.(DS:Array) 3] In case of Iterative merge sort.(DS:Linked List) 4]In case of Recursive merge sort.(DS:Linked List)
asked
Jan 21
in
Algorithms
by
Nandkishor3939
Active
(
1.2k
points)

63
views
mergesort
algorithms
sorting
0
votes
0
answers
10
MadeEasy Test Series: Algorithms  Sorting
Consider a scenario of modified quick sort, where we have given an input sorted array A[1 .. . n], all elements of array are distinct and n >=3. Pivot is the median of set of 3 elements [First element, middle element, and last element]. What will be worst case time complexity of modified quick sort? a.O($n^{2}$) b.O(nlogn) c.O($n^{2}$logn) d.O(nloglogn)
asked
Jan 21
in
Algorithms
by
newdreamz a1z0
Active
(
1.7k
points)

57
views
algorithms
sorting
quicksort
madeeasytestseries
+1
vote
0
answers
11
GATEBOOK2019 Mock Test125
Which of the following sorting algorithm has a running time that is least dependent on the initial ordering of the inputs? Quick sort. Insertion sort. Merge sort Selection sort
asked
Jan 19
in
Algorithms
by
GATEBOOK
Boss
(
17.2k
points)

225
views
gb2019mock1
sorting
0
votes
1
answer
12
sorted list
we are given (log m) sorted list each of size (log n) / (log m) the time complexity of merging list into single sorted list using mergesort is equal to a) O ( log m log(log n) ) b) O ( log n log(log m) ) c) O ( log m log n) d) O ( m log log n)
asked
Jan 16
in
Algorithms
by
Rahul_Rathod_
Junior
(
561
points)

88
views
algorithms
sorting
timecomplexity
0
votes
0
answers
13
ME_test_series
An array A of size n is known to be sorted except for the first k elements and the last k elements, where K is a constant. Which of the following algorithms will be the best choice for sorting the array A? A.) quick sort B.) insertion sort C.) selection sort D.) bubble sort I can’t understand how can insertion sort be better in this case?
asked
Jan 13
in
Algorithms
by
Shivam Kasat
Active
(
3.1k
points)

59
views
algorithms
sorting
0
votes
0
answers
14
Merge Sort
Can anyone help me to understand this problem….??
asked
Jan 8
in
Algorithms
by
Vikas123
(
367
points)

68
views
mergesort
algorithms
sorting
merging
0
votes
0
answers
15
MadeEasy Test Series: Programming & DS  Sorting
An array A of size n is known to be sorted except for the first k elements and the last k elements, where k is a constant. Which of the following algorithms will be the best choice for sorting the array A? aInsertion Sort bBubble sort cQuicksort dSelection sort
asked
Jan 1
in
DS
by
Shamim Ahmed
Active
(
2.5k
points)

106
views
datastructure
madeeasytestseries
sorting
+1
vote
1
answer
16
GO2019FLT162
Which of the following sorting algorithms performs efficiently to sort a singly linked list containing $\log n$ nodes and the corresponding time complexity is? $\text{Insertion sort, } O(\log ^2 n)$ $\text{Merge sort, } \Theta (( \log n) \log (\log n ))$ $\text{Heap sort, } \Theta ( \log ^2)(\log n ))$ $\text{Quick sort, } O ( \log 2)(\log n ))$
asked
Dec 27, 2018
in
Algorithms
by
Ruturaj Mohanty
Active
(
2.9k
points)

158
views
go2019flt1
sorting
0
votes
1
answer
17
MadeEasy Test Series: Algorithms  Sorting
Is there any standard way to sort in Quicksort or what all matters is PIVOT getting placed at its correct position thats it? I mean if only pivot condition then 3!*3! for both left and right elements but if any standard then each ... after 1st pass the array will remain as it is and only those elements compared with the minimum will be getting swapped.
asked
Dec 26, 2018
in
Algorithms
by
Markzuck
Junior
(
643
points)

82
views
algorithms
madeeasytestseries
sorting
sortingalgorithmsquicksort
0
votes
0
answers
18
Highest best case implies worst case?
Which of the below given sorting techniques has highest bestcase runtime complexity. (A) Quick sort (B) Selection sort (C) Insertion sort (D) Bubble sort Answer: (B) Explanation: Quick sort best case time complexity is Ο(n logn) Selection sort ... 12/ I did not understand this as best case time should be O(n) sorting method what does highest best cases mean?
asked
Dec 23, 2018
in
Algorithms
by
sripo
Active
(
2.6k
points)

65
views
algorithms
asymptoticnotations
datastructure
sorting
timecomplexity
0
votes
0
answers
19
Self Doubt
Please correct if any of the point is wrong : Quicksort: 1.Need more random accesses 2 Used when Random access is fast (hence preferred on array and not on Linked List) 2 No extra space needed ==> Inplace 4 Not a stable sorting algorithm ... : Quicksort in particular exhibits good cache locality and this makes it faster than merge sort in many cases like in virtual memory environment.
asked
Dec 21, 2018
in
Programming
by
jatin khachane 1
Loyal
(
7.1k
points)

59
views
programming
datastructure
sorting
0
votes
1
answer
20
MadeEasy Subject Test 2019: Algorithms  Sorting
asked
Dec 21, 2018
in
Algorithms
by
Ramij
(
351
points)

70
views
madeeasytestseries
algorithms
sorting
mergesort
–1
vote
0
answers
21
MadeEasy Test Series: Algorithms  Sorting
Which of the following sorting algorithm represented by above code?
asked
Dec 19, 2018
in
Algorithms
by
Abhishek Kumar 38
(
105
points)

92
views
madeeasytestseries
algorithms
sorting
0
votes
0
answers
22
MadeEasy Subject Test 2019: Algorithms  Sorting
Which of the following input will give best case time for selection sort? (A) 1 2 3 4 5 6 7 8 9 10 (B) 2 3 1 5 9 7 8 6 10 (C) 10 9 8 7 6 5 4 3 2 1 (D) All of above take same amount of time
asked
Dec 17, 2018
in
Algorithms
by
Rajat Agrawal007
Junior
(
611
points)

72
views
madeeasytestseries
algorithms
sorting
+1
vote
0
answers
23
MadeEasy Test Series: Algorithms  Sorting
An array of size n is known to be sorted except for the 1st k elements and the last k elements, where k is a constant. which of the following algorithm is the best choice for sorting the array A? Quick Sort or Insertion Sort? given answer is the insertion ... k), and it will take O(klogk) in average case and O(k^2) in the worst case. what's wrong in that?
asked
Dec 15, 2018
in
Algorithms
by
aambazinga
Active
(
3.3k
points)

77
views
madeeasytestseries
algorithms
sorting
0
votes
0
answers
24
Self doubt
The tightest lower bound on the number of comparisons, in the worst case, for comparisonbased sorting is The tightest upper bound on the number of comparisons, in the worst case, for comparisonbased sorting is The tightest lower bound on the number of ... comparisonbased sorting is The tightest upper bound on the number of comparisons, in the best case, for comparisonbased sorting is
asked
Dec 13, 2018
in
Algorithms
by
jatin khachane 1
Loyal
(
7.1k
points)

25
views
algorithms
sorting
0
votes
0
answers
25
made_easy_test_2019 (Algorithms)
explain how to solve the above question !
asked
Dec 11, 2018
in
Algorithms
by
air1ankit
Active
(
4.5k
points)

82
views
algorithms
sorting
0
votes
1
answer
26
GATE200322 Self doubt
The unusual $\Theta(n^2)$ implementation of Insertion Sort to sort an array uses linear search to identify the position where an element is to be inserted into the already sorted part of the array. If, instead, we use binary search to identify the ... case will be O(nlogn) because here no matter what the binary search will be performed for every element. Can someone confirm?
asked
Dec 3, 2018
in
Algorithms
by
Mk Utkarsh
Boss
(
34.9k
points)

102
views
algorithms
sorting
0
votes
2
answers
27
Adaptive sorting Algorithm.
Is Quick sort an adaptive sorting Algorithm? I think no. Because as per the definition given in the Wikipedia is that A adaptive sorting Algorithm is one who takes the advantage of preorderedness of the input. But in case of Quick sort it act as disadvantage.
asked
Dec 1, 2018
in
Algorithms
by
Shubhanshu
Boss
(
19.2k
points)

71
views
algorithms
sorting
quicksort
mergesort
0
votes
1
answer
28
Kth Largest element in MinHeap
What is the time complexity to find the Kth largest element in a MinHeap? Or equivalently, What is the time complexity to find Kth smallest element in MaxHeap?
asked
Dec 1, 2018
in
Algorithms
by
gmrishikumar
Active
(
1.8k
points)

174
views
algorithms
heap
binaryheap
timecomplexity
sorting
0
votes
0
answers
29
Self Doubt
Please explain me the difference between the following questions and their answers. All seems similar to me with different answers. https://gateoverflow.in/2048/gate2014314 https://gateoverflow.in/1830/gate200652 https://gateoverflow.in/25209/tifr2012b14
asked
Nov 30, 2018
in
Algorithms
by
Gupta731
Active
(
4.8k
points)

45
views
algorithms
sorting
+1
vote
1
answer
30
MadeEasy Test Series: Algorithms  Sorting
asked
Nov 22, 2018
in
Algorithms
by
Shamim Ahmed
Active
(
2.5k
points)

78
views
madeeasytestseries
algorithms
sorting
mergesort
Page:
1
2
3
4
5
6
...
10
next »
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
IIT Madras Interview Experience
IIT Kanpur Interview Experience
IIIT Hderabad Interview Experience
IIT Delhi Interview Experience
IIT Hyderabad Interview Experience
Follow @csegate
Recent questions tagged sorting
Recent Blog Comments
10000 to <2000 is really kind of achievement , my...
THey removed it this year... I did not check it,...
even though i am not going for iiit , can you...
I don't think IIITD requires any codechef...
Will apply for IIITB. IIIT D requires a codechef...
50,132
questions
53,252
answers
184,790
comments
70,509
users