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
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
Discrete mathematics 7th ed by Kenneth Rosen,chapter3:Algorithm
Should not there be a second condition stating i = j1 in While loop's conditional statement,if not then it seems to me while loop will be a infinite loop..
asked
5 days
ago
in
Algorithms
by
souren
(
37
points)

60
views
discretemathematics
algorithms
sorting
0
votes
0
answers
2
#CLRS #Algorithm Doubt about randomized QuickSort.
asked
May 27
in
Algorithms
by
iarnav
Loyal
(
7.9k
points)

75
views
algorithms
sortingalgorithmsquicksort
sorting
asymptoticnotations
+1
vote
1
answer
3
#Algorithms QuickSort Algorithm Doubt regarding pivot and analysis.
asked
May 22
in
Algorithms
by
iarnav
Loyal
(
7.9k
points)

85
views
algorithms
sorting
0
votes
0
answers
4
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
(
111k
points)

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

45
views
algorithms
sorting
0
votes
2
answers
6
#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
(
7.9k
points)

77
views
algorithms
sorting
0
votes
0
answers
7
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
(
7.9k
points)

86
views
algorithms
mergesort
sorting
0
votes
2
answers
8
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
(
141
points)

85
views
madeeasytestseries
algorithms
sorting
0
votes
1
answer
9
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.4k
points)

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

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

170
views
timecomplexity
algorithms
sorting
0
votes
1
answer
12
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
(
175
points)

117
views
madeeasybooklet
algorithms
sorting
0
votes
0
answers
13
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
(
1k
points)

81
views
mergesort
algorithms
sorting
0
votes
1
answer
14
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.5k
points)

75
views
algorithms
sorting
quicksort
madeeasytestseries
+1
vote
0
answers
15
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
(
11.4k
points)

228
views
gb2019mock1
sorting
0
votes
1
answer
16
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_
(
415
points)

111
views
algorithms
sorting
timecomplexity
0
votes
0
answers
17
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
(
3k
points)

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

79
views
mergesort
algorithms
sorting
merging
0
votes
0
answers
19
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.3k
points)

119
views
datastructure
madeeasytestseries
sorting
+1
vote
1
answer
20
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.5k
points)

170
views
go2019flt1
sorting
0
votes
1
answer
21
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
(
571
points)

92
views
algorithms
madeeasytestseries
sorting
sortingalgorithmsquicksort
0
votes
0
answers
22
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.3k
points)

82
views
algorithms
asymptoticnotations
datastructure
sorting
timecomplexity
0
votes
0
answers
23
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
(
6.7k
points)

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

82
views
madeeasytestseries
algorithms
sorting
mergesort
–1
vote
0
answers
25
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
(
81
points)

108
views
madeeasytestseries
algorithms
sorting
0
votes
0
answers
26
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
(
563
points)

83
views
madeeasytestseries
algorithms
sorting
+1
vote
0
answers
27
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.2k
points)

88
views
madeeasytestseries
algorithms
sorting
0
votes
0
answers
28
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
(
6.7k
points)

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

90
views
algorithms
sorting
0
votes
1
answer
30
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.5k
points)

115
views
algorithms
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
The day that made me an IIScian :)
Unanswered Previous year GATE/TIFR questions
From being a Failure to getting into IISc  (Rank 888, Score 692)
My interview experience at IITs/IISc
IIT Delhi CSE Mtech interview 14 may
Follow @csegate
Recent questions tagged sorting
Recent Blog Comments
@Debargh, Yes. 👍
Thanks. Regarding the probability question, was...
Thanks
What were the Eigen values of A apart from 0? I...
49,540
questions
54,099
answers
187,269
comments
71,006
users