Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged sorting
233
views
1
answers
1
votes
Self Doubt
How to approach this type of questions?
halfcodeblood
233
views
halfcodeblood
asked
May 26
Algorithms
algorithms
sorting
data-structures
self-doubt
+
–
263
views
1
answers
1
votes
Divide and conquer
In quick sort, n numbers the (n/10)th element is selected as pivot using n^2 sortimng time complexity what will be the time complexity of quick sort is.....a)O(nlogn)b)O(n^2)c)O(n^3)d)O(n)
Emankashyap
263
views
Emankashyap
asked
Apr 30
Algorithms
divide-and-conquer
algorithms
time-complexity
recurrence-relation
sorting
+
–
336
views
1
answers
0
votes
Sorting Algorithm
For flag based approach in Bubble sort we can check first by a flag if the list is sorted or not in O(n), and if it is sorted, then no need to sort ... the same concept applicable to selection sort? Why it never comes down from O(n$^2$)?
Mrityudoot
336
views
Mrityudoot
asked
Mar 7
Algorithms
algorithms
sorting
time-complexity
asymptotic-notation
+
–
1.1k
views
1
answers
0
votes
GATE DS&AI 2024 | Question: 35
Consider the following sorting algorithms:Bubble sortInsertion sortSelection sortWhich ONE among the following choices of sorting algorithms sorts the numbers in the array $[4,3,2,1,5]$ ... $\text{(ii)}$ and $\text{(iii)}$ only
Arjun
1.1k
views
Arjun
asked
Feb 16
Algorithms
gate-ds-ai-2024
algorithms
sorting
+
–
3.3k
views
2
answers
2
votes
GATE CSE 2024 | Set 2 | Question: 25
Let $\text{A}$ be an array containing integer values. The distance of $\text{A}$ is defined as the minimum number of elements in $\text{A}$ that must be replaced with ... order. The distance of the array $[2,5,3,1,4,2,6]$ is ___________.
Arjun
3.3k
views
Arjun
asked
Feb 16
Algorithms
gatecse2024-set2
numerical-answers
algorithms
sorting
+
–
3.1k
views
1
answers
3
votes
GATE CSE 2024 | Set 1 | Question: 31
An array $[82,101,90,11,111,75,33,131,44,93]$ is heapified. Which one of the following options represents the first three elements in the heapified array?$82,90,101$82,11,93$131,11,93$131,111,90$
Arjun
3.1k
views
Arjun
asked
Feb 16
Algorithms
gatecse2024-set1
algorithms
heap-sort
sorting
+
–
518
views
0
answers
0
votes
GATE 2024
Consider an n element array which is to be sorted either in ascending or descending order. The given restriction is only one pass will be used for completely ... be the worst time complexity?Is this related to bubble sort algorithm or not?
TusharRana
518
views
TusharRana
asked
Feb 11
Algorithms
algorithms
sorting
+
–
713
views
2
answers
2
votes
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 20
Consider the following array$: [32, 33, 5, 2, 14, -4, 22, 39, 34, -9].$ We apply a certain sorting algorithm and observe that the ... applied?Merge sort (top-down approach)Bubble sortQuicksort (Using First element as pivot)Insertion sort
GO Classes
713
views
GO Classes
asked
Feb 5
Algorithms
goclasses2024-mockgate-14
algorithms
sorting
merge-sort
multiple-selects
1-mark
+
–
340
views
1
answers
3
votes
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 47
A $\text{stable sort}$ ...
GO Classes
340
views
GO Classes
asked
Feb 5
Algorithms
goclasses2024-mockgate-14
algorithms
sorting
2-marks
+
–
190
views
0
answers
0
votes
Memory Based GATE DA 2024 | Question: 22
Given the array \( [4, 3, 2, 1, 5] \), which of the following sorting algorithms can successfully sort the array in exactly two passes?Bubble SortInsertion Sort Selection SortMerge Sort
GO Classes
190
views
GO Classes
asked
Feb 4
Algorithms
gate2024-da-memory-based
goclasses
algorithms
sorting
+
–
721
views
2
answers
5
votes
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 29
Consider an array that has $10$ distinct elements. Suppose we use randomized quicksort (with the pivot chosen uniformly at random). What is the probability that the ... of the chosen pivot. The pivot itself is not part of any subarray.
GO Classes
721
views
GO Classes
asked
Jan 21
Algorithms
goclasses2024-mockgate-12
goclasses
numerical-answers
algorithms
sorting
quick-sort
2-marks
+
–
460
views
1
answers
3
votes
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 24
Here is an array of ten integers$: 5389170264$Suppose we run MergeSort on this array. What is the number in the $7$th position of the partially sorted array after the outermost two ... $ in its $7$th position.)$3$1$2$4$
GO Classes
460
views
GO Classes
asked
Jan 13
Algorithms
goclasses2024-mockgate-11
goclasses
algorithms
sorting
merge-sort
1-mark
+
–
651
views
1
answers
8
votes
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 49
An inversion in an array $a$ is a pair of array indices $(i, j)$ such that $i<j$ but $a[i]>a[j]$.What is the maximum number of inversions that can be eliminated by the following program ... $6$9$20$
GO Classes
651
views
GO Classes
asked
Jan 13
Algorithms
goclasses2024-mockgate-11
goclasses
algorithms
sorting
2-marks
+
–
240
views
1
answers
0
votes
ISRO 2024
Worst case time complexity of heap sort for n elementsO(nlogn)O(logn)O^2O(n)
Ramayya
240
views
Ramayya
asked
Jan 7
Algorithms
isro-2024
algorithms
heap-sort
sorting
+
–
212
views
1
answers
1
votes
UGC NET CSE | June 2008 | Part 2 | Question: 23
Which of the following is true for a sorted list with ' $n$ ' elements?Insertion in a sorted array takes constant time.Insertion in a sorted linear linked list takes ... sorted linear linked list can be done in $\mathrm{O}(\log n)$ time.
admin
212
views
admin
asked
Jan 6
Others
ugcnetcse-june2008-paper2
sorting
array
time-complexity
+
–
369
views
1
answers
1
votes
Self doubt
#include <stdio.h>void SSort(int [], int);void swap(int *,int*);int main() { int arr[] = {5,4,3,2,1,0}; int n = sizeof(arr)/sizeof(arr[0]) ... sort algorithm. But the output of the algo is: 0 0 0 0 0 0. Where is the problem ?
Gopal6854
369
views
Gopal6854
asked
Sep 13, 2023
DS
sorting
self-doubt
algorithms
+
–
1.3k
views
2
answers
0
votes
Binary search is performed on a sorted array of n elements. The search key is not in the array and falls between the elements at positions m and m+1 (where 1 ≤ m < n). How many comparisons are needed in the worst case scenario to determine that the key is not in the array?
Binary search is performed on a sorted array of n elements. The search key is not in the array and falls between the elements at positions m and m+1 (where 1 ≤ m < n). How ... . ceil(log(n))b. floor(log(n))c. ceil(log(m))d. floor(log(m))
dhruba
1.3k
views
dhruba
asked
Jun 5, 2023
Algorithms
algorithms
binary-search
sorting
+
–
472
views
1
answers
0
votes
Combinatorics, Discrete Maths (self doubts)
Consider the set of 4 -digit positive integers. How many of them have their digits in :-a) strictly decreasing order ?b) non decreasing order ?c) non increasing order ?
Swarnava Bose
472
views
Swarnava Bose
asked
Jun 3, 2023
Combinatory
combinatory
sorting
discrete-mathematics
goclasses
+
–
321
views
0
answers
0
votes
Algorithm
Çșȇ ʛấẗẻ
321
views
Çșȇ ʛấẗẻ
asked
May 11, 2023
Algorithms
algorithms
time-complexity
sorting
+
–
Page:
1
2
3
4
5
6
...
19
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register