Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged sorting
5
votes
1
answer
271
In-place Merge Sort via Doubly linked list in place of Array
In general merge sort is not considered in-place sorting technique. Because an auxiliary array is used. If we will try to do it in-place in array data structure then our merge procedure will take O($n^2$) time. so overall ... list in place of Array (for storing and merging data) ? Please share your valuable opinion. It will be great help.
Chhotu
asked
in
Algorithms
Nov 2, 2017
by
Chhotu
1.4k
views
algorithms
sorting
space-complexity
linked-list
time-complexity
2
votes
1
answer
272
algorithm
Suppose A is sorted array and some of the elements are duplicates what is the best upper bound to find out the number of elements that are equal to any given key 'k'.
Kaluti
asked
in
Algorithms
Nov 1, 2017
by
Kaluti
871
views
algorithms
sorting
2
votes
0
answers
273
Sorting
If we are asked to find best comparison based sorting algorithm to sort n numbers having d digit's and in the range from [1-k]. If I say it is quick sort or merge sort or heap sort is it wrong ? OR in general we do sorting on these type of numbers using Radix sort only ?
junaid ahmad
asked
in
Algorithms
Oct 29, 2017
by
junaid ahmad
646
views
sorting
0
votes
0
answers
274
MERGE SORT
IS 2 way merge sort and normal merge sort is same.in which we have to use bottom-up merging approach by taking 2-2 element inside the list.if 5-way merge sort then in the list we have to take 5-5 elements from bottom to up for merging. if I am wrong please let me correct!
learner_geek
asked
in
Algorithms
Oct 28, 2017
by
learner_geek
590
views
merge-sort
algorithms
sorting
time-complexity
0
votes
1
answer
275
Algorithm doubt
In sorted array of size n time required to verify if there exist 2 number a and b such that a+ b = s in worst case Where s is a constant.
Surya Dhanraj
asked
in
Algorithms
Oct 24, 2017
by
Surya Dhanraj
406
views
sorting
time-complexity
4
votes
1
answer
276
Modified form of GATE1996_2.15
Quick-sort 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 ?
rishi71662data4
asked
in
Algorithms
Oct 18, 2017
by
rishi71662data4
961
views
algorithms
data-structures
sorting
quick-sort
3
votes
2
answers
277
Time complexity
Given a 2D array X[m][n] which has m rows and n columns. The array X is row wise and column wise sorted (i.e) each individula row and column is sorted. What is the complexity to search an element in this array a)O(m*n) b)O(m2) or O(n2) c)O(log2(m*n)) d)O(m+n)
A_i_$_h
asked
in
Algorithms
Oct 12, 2017
by
A_i_$_h
844
views
sorting
time-complexity
4
votes
1
answer
278
Merge sort
True or False Merge sort on Linked list takes O(nlogn)
Shivi rao
asked
in
DS
Oct 10, 2017
by
Shivi rao
1.5k
views
merge-sort
algorithms
sorting
time-complexity
2
votes
1
answer
279
Test series
An array ‘A’ of length n contains numbers {0, 1, 2}, numbers are present in array in arbitrary order. The best sorting algorithms, takes 250 units of time when n = 100. If n = 450. The minimum time required by algorithm on same hardware __________ (Rounded off to integers).
Shivi rao
asked
in
Algorithms
Oct 9, 2017
by
Shivi rao
480
views
test-series
algorithms
sorting
time-complexity
4
votes
4
answers
280
Ace Test Series: Algorithms - Sorting
Consider bottom-up merge sort working on 'n' elements. Assume 'n' is a power of 2. The minimum number of comparisons in order to get sorted list is (A) (n log n) / 2 (B) n lon n - n + 1 (C) n log n (D) n log n + n
Aibi
asked
in
Algorithms
Oct 8, 2017
by
Aibi
2.6k
views
merge-sort
ace-test-series
sorting
algorithms
1
vote
1
answer
281
made easy test
charul
asked
in
Algorithms
Oct 2, 2017
by
charul
428
views
made-easy-test-series
sorting
1
vote
1
answer
282
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.
dragonball
asked
in
Algorithms
Sep 27, 2017
by
dragonball
615
views
algorithms
sorting
quick-sort
2
votes
2
answers
283
Algorithm: Selection Sort
Consider the following code which sort all elements of an array A' in descending order. Which of the following will represents correct value of X, Y, Z in above code for selection sort? a. i > 0, K > 0, a[K] > a[max] b. i ... the array in the descending order but by using option a it is aranging in ascending order. And option D is doing what question is saying.
Shubhanshu
asked
in
Algorithms
Sep 24, 2017
by
Shubhanshu
1.8k
views
algorithms
sorting
selection-sort
test-series
1
vote
2
answers
284
Bucket sort
1. Is bucket sort always stable or does it depend on the sorting subroutine used by bucket sort toe sort the buckets? 2. Bucket sort is always NOT inplace.Is this correct?
rahul sharma 5
asked
in
Algorithms
Sep 22, 2017
by
rahul sharma 5
862
views
sorting
algorithms
1
vote
1
answer
285
arrange the sorting algorithms ascending wise
What is the ascending wise order of sorting algorithms which takes least time and least space to sort the elements?
LavTheRawkstar
asked
in
Programming in C
Sep 11, 2017
by
LavTheRawkstar
2.4k
views
algorithms
programming-in-c
time-complexity
sorting
3
votes
3
answers
286
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.
Sourajit25
asked
in
Algorithms
Sep 3, 2017
by
Sourajit25
1.6k
views
algorithms
sorting
time-complexity
quick-sort
1
vote
1
answer
287
Divide and Conquer
Given an unsorted array. The array has this property that every element in array is at most k distance from its position in sorted array where k is a positive integer smaller than size of array. Which sorting algo can be easily modified for sorting this array and what is the obtainable time complexity ?
chetan raghav
asked
in
Algorithms
Sep 3, 2017
by
chetan raghav
641
views
divide-and-conquer
sorting
time-complexity
3
votes
3
answers
288
Sorted List
suppose there are 4 sorted lists of n/4 elements each. if we merge these list into a single sorted list of n elements, for the n=400 number of key comparisons in the worst case using an efficient algorithm is
ABKUNDAN
asked
in
Algorithms
Aug 21, 2017
by
ABKUNDAN
5.7k
views
sorting
algorithms
1
vote
1
answer
289
Please solve this Q
What could be the best algorithm from the following when the time complexity is measured based bon the number of swaps performed by the sorting algorithm? 1. Selection sort 2. Insertion sort 3. Bubble sort 4. None of these
kallu singh
asked
in
Algorithms
Aug 19, 2017
by
kallu singh
232
views
time-complexity
sorting
3
votes
1
answer
290
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?
SHALINI PORWAL
asked
in
Algorithms
Aug 10, 2017
by
SHALINI PORWAL
1.4k
views
algorithms
sorting
time-complexity
quick-sort
2
votes
2
answers
291
merge sort no. of levels when input is n ??
HOW NO. OF LEVELS IS LOG N + 1 CAN ANYONE HELP ME , how to solve this and get log n + 1
sumit goyal 1
asked
in
Algorithms
Aug 9, 2017
by
sumit goyal 1
725
views
algorithms
sorting
merge-sort
4
votes
0
answers
292
Sorting: A comparison between sorting Algos
When an array is to be sorted, It may happen that some data values start out being in the same position where they should end up. For example in the array which is originally {40, -1, 33, 0} 33 is right where it will be in the final sorted output: {- ... (even temporarily) moves such an element (a) ii only (b) i & iii (c) i & ii (d) ii & iii
Manu Thakur
asked
in
Algorithms
Jul 31, 2017
by
Manu Thakur
763
views
algorithms
sorting
1
vote
1
answer
293
algorithm
array has n elements and we need to sort them in non decreasing order as follows. first find minimum, remove this element from the array and find minimum of remaining elements, remove this element and so on until array becomes emplty . In best case how many comparisons needed
A_i_$_h
asked
in
Algorithms
Jul 24, 2017
by
A_i_$_h
294
views
sorting
array
time-complexity
1
vote
1
answer
294
algorithm
Array of 1 to n^6 , which algorithm can be used to sort in linear time? a) not possible B)radix c)counting d)quick
A_i_$_h
asked
in
Algorithms
Jul 22, 2017
by
A_i_$_h
319
views
sorting
time-complexity
1
vote
0
answers
295
number of movements in Insertion sort
will A[i+1]=key; in the insertion sort be counted as a movement in best case?
vineet.ildm
asked
in
Algorithms
Jul 18, 2017
by
vineet.ildm
1.0k
views
algorithms
sorting
1
vote
1
answer
296
Daa........
What is the ans and give reason
Dharam raj
asked
in
Algorithms
Jul 12, 2017
by
Dharam raj
714
views
sorting
algorithm-design-technique
test-series
1
vote
1
answer
297
Complexity
What is the method to find the time complexity to search an element which appears more than 20% in sorted array having n elements. and also for 1% or 40% .
Diksha Aswal
asked
in
Algorithms
Jul 11, 2017
by
Diksha Aswal
342
views
time-complexity
sorting
2
votes
1
answer
298
Gate algorithm
Harikesh Kumar
asked
in
Algorithms
Jul 10, 2017
by
Harikesh Kumar
499
views
sorting
binary-search
time-complexity
test-series
2
votes
1
answer
299
Insertion Sort
How to get Time Complexity of finding the number of inversions in an array?
Diksha Aswal
asked
in
Algorithms
Jul 8, 2017
by
Diksha Aswal
373
views
sorting
time-complexity
2
votes
1
answer
300
Introduction To Algorithms 8.3-2
How are heap sort and quick sort not stable?
Shubham Pande
asked
in
Algorithms
Jul 7, 2017
by
Shubham Pande
510
views
algorithms
sorting
Page:
« prev
1
...
5
6
7
8
9
10
11
12
13
14
15
...
19
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged sorting
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...