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
Made Easy Test Series: AlgorithmSorting
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)$ ... sorts part by part using pivot. So, why not will it be answer?? How do we know it is asking for almost sorted array??
asked
May 12
in
Algorithms
by
srestha
Veteran
(
114k
points)

32
views
algorithms
madeeasytestseries
sorting
0
votes
0
answers
2
Mimimum number of comparison to sort 13 elements/numbers for any comparison based sorting algorithm?
asked
May 4
in
Algorithms
by
iarnav
Loyal
(
9.8k
points)

21
views
algorithms
sorting
0
votes
1
answer
3
#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
Apr 25
in
Algorithms
by
iarnav
Loyal
(
9.8k
points)

62
views
algorithms
sorting
0
votes
0
answers
4
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
Apr 25
in
Algorithms
by
iarnav
Loyal
(
9.8k
points)

30
views
algorithms
mergesort
sorting
0
votes
2
answers
5
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)

79
views
madeeasytestseries
algorithms
sorting
0
votes
1
answer
6
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
(
40.5k
points)

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

120
views
algorithms
timecomplexity
sorting
0
votes
1
answer
8
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
(
3k
points)

160
views
timecomplexity
algorithms
sorting
0
votes
1
answer
9
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)

102
views
madeeasybooklet
algorithms
sorting
0
votes
2
answers
10
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)

82
views
algorithms
linkedlists
sorting
0
votes
0
answers
11
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)

73
views
mergesort
algorithms
sorting
0
votes
0
answers
12
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)

65
views
algorithms
sorting
quicksort
madeeasytestseries
+1
vote
0
answers
13
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.3k
points)

228
views
gb2019mock1
sorting
0
votes
1
answer
14
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)

94
views
algorithms
sorting
timecomplexity
0
votes
0
answers
15
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)

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

72
views
mergesort
algorithms
sorting
merging
0
votes
0
answers
17
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)

115
views
datastructure
madeeasytestseries
sorting
+1
vote
1
answer
18
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)

161
views
go2019flt1
sorting
0
votes
1
answer
19
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)

87
views
algorithms
madeeasytestseries
sorting
sortingalgorithmsquicksort
0
votes
0
answers
20
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)

74
views
algorithms
asymptoticnotations
datastructure
sorting
timecomplexity
0
votes
0
answers
21
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)

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

75
views
madeeasytestseries
algorithms
sorting
mergesort
–1
vote
0
answers
23
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)

99
views
madeeasytestseries
algorithms
sorting
0
votes
0
answers
24
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)

76
views
madeeasytestseries
algorithms
sorting
+1
vote
0
answers
25
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)

81
views
madeeasytestseries
algorithms
sorting
0
votes
0
answers
26
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)

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

84
views
algorithms
sorting
0
votes
1
answer
28
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
(
35.4k
points)

106
views
algorithms
sorting
0
votes
2
answers
29
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)

78
views
algorithms
sorting
quicksort
mergesort
0
votes
1
answer
30
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)

187
views
algorithms
heap
binaryheap
timecomplexity
sorting
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 Kanpur MS Interview experience
My GATE preparation and what you can learn from it
IIT Bombay RA (2019) Programming Questions
COAP Round 1 has started
MTECH (COUURSE WORK) AI INTERVIEW EXPERIENCE 2019
Follow @csegate
Recent questions tagged sorting
Recent Blog Comments
It was free when I gave them, maybe they made it...
The tests are there but it ain't free. Cost is...
They removed their tests recently, I think it'll...
how did you get Success gateway test series for...
49,722
questions
53,593
answers
185,825
comments
70,877
users