Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged sorting
1.1k
views
2
answers
0
votes
quick sort
kvkumar
1.1k
views
kvkumar
asked
Nov 7, 2017
Algorithms
sorting
quick-sort
+
–
8.3k
views
1
answers
5
votes
minimum number of comparisons
You are given an array of 64 elements, minimum number of comparisons required to find out second largest element among all will be _______.
shaurya vardhan
8.3k
views
shaurya vardhan
asked
Nov 4, 2017
Algorithms
algorithms
normal
numerical-answers
sorting
+
–
3.1k
views
2
answers
2
votes
test series
To merge two lists of size m and n, how many comparisons we need to perform in the worst case and best case respectively ?a) m+n-1 and m+n-1b)m+n+1 and max ... +n-1 and min(m,n) can someone give the worst case and best case with examples ?
shaurya vardhan
3.1k
views
shaurya vardhan
asked
Nov 4, 2017
Algorithms
algorithms
sorting
normal
+
–
704
views
1
answers
4
votes
ME TEST SERIES
Consider two arrays A[] and B[],if arrays A is in increasing order and array B is in decreasing order is input to join a algorithm. the output is an array C[1......2n] ... for join algorithm to join two array?A) O(n2)B)O(n)C)O(1)D)O(nlogn)
mohitbawankar
704
views
mohitbawankar
asked
Nov 2, 2017
Algorithms
made-easy-test-series
sorting
time-complexity
+
–
1.4k
views
1
answers
5
votes
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 ... and merging data) ?Please share your valuable opinion. It will be great help.
Chhotu
1.4k
views
Chhotu
asked
Nov 2, 2017
Algorithms
algorithms
sorting
space-complexity
linked-list
time-complexity
+
–
927
views
1
answers
2
votes
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
927
views
Kaluti
asked
Nov 1, 2017
Algorithms
algorithms
sorting
+
–
707
views
0
answers
2
votes
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 ... wrong ?OR in general we do sorting on these type of numbers using Radix sort only ?
junaid ahmad
707
views
junaid ahmad
asked
Oct 29, 2017
Algorithms
sorting
+
–
642
views
0
answers
0
votes
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 ... -5 elements from bottom to up for merging.if I am wrong please let me correct!
learner_geek
642
views
learner_geek
asked
Oct 28, 2017
Algorithms
merge-sort
algorithms
sorting
time-complexity
+
–
454
views
1
answers
0
votes
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
454
views
Surya Dhanraj
asked
Oct 24, 2017
Algorithms
sorting
time-complexity
+
–
1.0k
views
1
answers
4
votes
Modified form of GATE1996_2.15
Quick-sort is run on two inputs shown below to sort in ascending order taking first element as pivoti) 1,2,3, nii) n,n−1,n−2, ,2,1Let S1 and S2 be ... S2 related ?ii) How will the answer change if the pivot is changed to middle element ?
rishi71662data4
1.0k
views
rishi71662data4
asked
Oct 18, 2017
Algorithms
algorithms
data-structures
sorting
quick-sort
+
–
881
views
2
answers
3
votes
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 ... arraya)O(m*n)b)O(m2) or O(n2)c)O(log2(m*n))d)O(m+n)
A_i_$_h
881
views
A_i_$_h
asked
Oct 12, 2017
Algorithms
sorting
time-complexity
+
–
1.6k
views
1
answers
4
votes
Merge sort
True or FalseMerge sort on Linked list takes O(nlogn)
Shivi rao
1.6k
views
Shivi rao
asked
Oct 10, 2017
DS
merge-sort
algorithms
sorting
time-complexity
+
–
510
views
1
answers
2
votes
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 ... minimum time required by algorithm on same hardware __________ (Rounded off to integers).
Shivi rao
510
views
Shivi rao
asked
Oct 9, 2017
Algorithms
test-series
algorithms
sorting
time-complexity
+
–
2.7k
views
4
answers
4
votes
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
2.7k
views
Aibi
asked
Oct 8, 2017
Algorithms
merge-sort
ace-test-series
sorting
algorithms
+
–
449
views
1
answers
1
votes
made easy test
charul
449
views
charul
asked
Oct 2, 2017
Algorithms
made-easy-test-series
sorting
+
–
646
views
1
answers
1
votes
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 3 rd element as pivot then how the partitioning algorithm will change.
dragonball
646
views
dragonball
asked
Sep 27, 2017
Algorithms
algorithms
sorting
quick-sort
+
–
1.9k
views
2
answers
2
votes
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 ... it is aranging in ascending order.And option D is doing what question is saying.
Shubhanshu
1.9k
views
Shubhanshu
asked
Sep 24, 2017
Algorithms
algorithms
sorting
selection-sort
test-series
+
–
912
views
2
answers
1
votes
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
912
views
rahul sharma 5
asked
Sep 22, 2017
Algorithms
sorting
algorithms
+
–
2.5k
views
1
answers
1
votes
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
2.5k
views
LavTheRawkstar
asked
Sep 11, 2017
Programming in C
algorithms
programming-in-c
time-complexity
sorting
+
–
1.7k
views
3
answers
3
votes
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
1.7k
views
Sourajit25
asked
Sep 3, 2017
Algorithms
algorithms
sorting
time-complexity
quick-sort
+
–
679
views
1
answers
1
votes
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 ... be easily modified for sorting this array and what is the obtainable time complexity ?
chetan raghav
679
views
chetan raghav
asked
Sep 3, 2017
Algorithms
divide-and-conquer
sorting
time-complexity
+
–
5.9k
views
3
answers
3
votes
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
5.9k
views
ABKUNDAN
asked
Aug 21, 2017
Algorithms
sorting
algorithms
+
–
269
views
1
answers
1
votes
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 sort2. Insertion sort3. Bubble sort4. None of these
kallu singh
269
views
kallu singh
asked
Aug 19, 2017
Algorithms
time-complexity
sorting
+
–
1.4k
views
1
answers
3
votes
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
1.4k
views
SHALINI PORWAL
asked
Aug 10, 2017
Algorithms
algorithms
sorting
time-complexity
quick-sort
+
–
773
views
2
answers
2
votes
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
773
views
sumit goyal 1
asked
Aug 9, 2017
Algorithms
algorithms
sorting
merge-sort
+
–
825
views
0
answers
4
votes
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 ... only (b) i & iii (c) i & ii (d) ii & iii
Manu Thakur
825
views
Manu Thakur
asked
Jul 31, 2017
Algorithms
algorithms
sorting
+
–
324
views
1
answers
1
votes
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 ... and so on until array becomes emplty . In best case how many comparisons needed
A_i_$_h
324
views
A_i_$_h
asked
Jul 24, 2017
Algorithms
sorting
array
time-complexity
+
–
350
views
1
answers
1
votes
algorithm
Array of 1 to n^6 , which algorithm can be used to sort in linear time?a) not possibleB)radixc)countingd)quick
A_i_$_h
350
views
A_i_$_h
asked
Jul 22, 2017
Algorithms
sorting
time-complexity
+
–
1.0k
views
0
answers
1
votes
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
1.0k
views
vineet.ildm
asked
Jul 18, 2017
Algorithms
algorithms
sorting
+
–
758
views
1
answers
1
votes
Daa........
What is the ans and give reason
Dharam raj
758
views
Dharam raj
asked
Jul 12, 2017
Algorithms
sorting
algorithm-design-technique
test-series
+
–
Page:
« prev
1
...
5
6
7
8
9
10
11
12
13
14
15
...
19
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register