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
1
vote
1
answer
61
NPTEL Assignment Question
In an array A[1..n] of n distinct elements, if i < j and A[i] > A[j], then the pair (i,j) is called an inversion of A. How many inversions are there in the array A = {n,n-1,n-2,...,3,2,1}? n(n-1) / 2 n(n+1) / 2 2n(n+1) None
rsansiya111
asked
in
Algorithms
Dec 7, 2021
by
rsansiya111
322
views
nptel-quiz
sorting
inversion
1
vote
1
answer
62
Self doubt
what is significance of loop Invariant? when we use a loop in an algo we check it , if it properly runs then fix it in that, then why do check separately loop invariant ?
afroze
asked
in
Algorithms
Nov 4, 2021
by
afroze
576
views
algorithms
sorting
0
votes
2
answers
63
Sorting(Algorithms)
The complexity of comparison based sorting algorithm is (nlogn) .How?
_Madhuri
asked
in
Algorithms
Oct 9, 2021
by
_Madhuri
637
views
algorithms
time-complexity
sorting
0
votes
1
answer
64
personal doubt
The tightest lower bound on the number of swaps, in the worst case, for comparison-based sorting is of the order of __________.
Pabitra Sahoo
asked
in
Algorithms
Sep 12, 2021
by
Pabitra Sahoo
492
views
sorting
algorithms
2
votes
1
answer
65
TIFR CSE 2021 | Part B | Question: 15
Let $A\left [ i \right ] : i=0, 1, 2, \dots , n-1$ be an array of $n$ distinct integers. We wish to sort $A$ in ascending order. We are given that each element in the array is at a position that is at most $k$ away from its position in the sorted array, ... $t\left ( n \right ) = \Theta \left ( nk \right )$
soujanyareddy13
asked
in
Algorithms
Mar 25, 2021
by
soujanyareddy13
759
views
tifr2021
algorithms
sorting
time-complexity
14
votes
6
answers
66
GATE CSE 2021 Set 1 | Question: 9
Consider the following array.$\begin{array}{|l|l|l|l|l|l|} \hline 23&32&45&69&72&73&89&97 \\ \hline\end{array}$ Which algorithm out of the following options uses the least number of comparisons ( ... elements) to sort the above array in ascending order? Selection sort Mergesort Insertion sort Quicksort using the last element as pivot
Arjun
asked
in
Algorithms
Feb 18, 2021
by
Arjun
12.1k
views
gatecse-2021-set1
algorithms
sorting
1-mark
2
votes
1
answer
67
NIELIT Scientific Assistant A 2020 November: 88
The given array is $\text{arr={1, 2, 4, 3}}$. Bubble sort is used to sort the array elements. How many passes will be done to sort the array? $4$ $2$ $1$ $3$
gatecse
asked
in
Algorithms
Dec 9, 2020
by
gatecse
807
views
nielit-sta-2020
algorithms
sorting
bubble-sort
1
vote
1
answer
68
NIELIT Scientific Assistant A 2020 November: 103
Consider an array of positive integers between $123456$ to $876543$, which sorting algorithm can be used to sort these number in linear time? Impossible to sort in linear time Radix Sort Insertion Sort Bubble Sort
gatecse
asked
in
Algorithms
Dec 9, 2020
by
gatecse
628
views
nielit-sta-2020
algorithms
sorting
radix-sort
6
votes
5
answers
69
NIELIT 2017 DEC Scientific Assistant A - Section B: 39
Merge sort uses : Divide-and-conquer Backtracking Heuristic approach Greedy approach
admin
asked
in
Algorithms
Mar 31, 2020
by
admin
1.6k
views
nielit2017dec-assistanta
algorithms
sorting
merge-sort
divide-and-conquer
5
votes
5
answers
70
NIELIT 2017 DEC Scientific Assistant A - Section B: 53
Given two sorted list of size '$m$' and '$n$' respectively. The number of comparisons needed in the worst case by the merge sort algorithm will be : $m^{*}n$ minimum of $m, n$ maximum of $m, n$ $m+n-1$
admin
asked
in
Algorithms
Mar 31, 2020
by
admin
1.8k
views
nielit2017dec-assistanta
algorithms
sorting
merge-sort
4
votes
11
answers
71
NIELIT 2016 MAR Scientist B - Section C: 12
Which of the following sorting algorithms does not have a worst case running time of $O(n^2)$? Insertion sort. Merge sort. Quick sort. Bubble sort.
admin
asked
in
Algorithms
Mar 31, 2020
by
admin
15.5k
views
nielit2016mar-scientistb
algorithms
sorting
time-complexity
1
vote
4
answers
72
NIELIT 2016 DEC Scientist B (IT) - Section B: 8
Selection sort, quick sort is a stable sorting method True,True False,False True,False False,True
admin
asked
in
Algorithms
Mar 31, 2020
by
admin
4.4k
views
nielit2016dec-scientistb-it
algorithms
sorting
3
votes
2
answers
73
NIELIT 2016 DEC Scientist B (IT) - Section B: 12
Which of the following sorting procedures is the slowest? Quick Sort Merge Sort Shell Sort Bubble Sort
admin
asked
in
Algorithms
Mar 31, 2020
by
admin
3.9k
views
nielit2016dec-scientistb-it
algorithms
sorting
2
votes
4
answers
74
NIELIT 2016 DEC Scientist B (CS) - Section B: 12
The running time of Quick sort algorithm depends heavily on the selection of: No. of inputs Arrangement of elements in an array Size of elements Pivot Element
admin
asked
in
Algorithms
Mar 31, 2020
by
admin
15.1k
views
nielit2016dec-scientistb-cs
algorithms
sorting
quick-sort
5
votes
5
answers
75
ISRO2020-33
If an array $A$ contains the items $10,4,7,23,67,12$ and $5$ in that order, what will be the resultant array $A$ after third pass of insertion sort? $67,12,10,5,4,7,23$ $4,7,10,23,67,12,5$ $4,5,7,67,10,12,23$ $10,7,4,67,23,12,5$
Satbir
asked
in
Algorithms
Jan 13, 2020
by
Satbir
7.7k
views
isro-2020
algorithms
sorting
normal
3
votes
4
answers
76
ISRO2020-65
Of the following sort algorithms, which has execution time that is least dependant on initial ordering of the input? Insertion sort Quick sort Merge sort Selection sort
Satbir
asked
in
Algorithms
Jan 13, 2020
by
Satbir
3.3k
views
isro-2020
algorithms
sorting
normal
7
votes
3
answers
77
UGC NET CSE | June 2019 | Part 2 | Question: 64
Which of the following is best running time to sort $n$ integers in the range $0$ to $n^2-1$? $O(\text{lg } n)$ $O(n)$ $O(n\text { lg }n)$ $O(n^2)$
Arjun
asked
in
Algorithms
Jul 2, 2019
by
Arjun
3.3k
views
ugcnetcse-june2019-paper2
sorting
1
vote
0
answers
78
Cormen Edition 3 Exercise 8.4 Question 5 (Page No. 204)
A probability distribution function $P(x)$ for a random variable $X$ is defined by $P(x) =Pr\{X\leq x\}$.Suppose that we draw a list of $n$ random variables $X_1,X_2,…,X_n$ from a continuous probability distribution function $P$ that is computable in $O(1)$ time. Give an algorithm that sorts these numbers in linear averagecase time.
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
446
views
cormen
algorithms
sorting
bucket-sort
descriptive
difficult
0
votes
0
answers
79
Cormen Edition 3 Exercise 8.4 Question 4 (Page No. 204)
We are given $n$ points in the unit circle, $P_i=(x_i,y_i)$, such that $0<x_i^2+y_i^2<1$ for $i=1,2, .,n$.Suppose that the points are uniformly distributed; that is, the probability of finding a point in ... the origin. (Hint: Design the bucket sizes in BUCKET-SORT to reflect the uniform distribution of the points in the unit circle.)
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
641
views
cormen
algorithms
sorting
bucket-sort
descriptive
difficult
1
vote
1
answer
80
Cormen Edition 3 Exercise 8.4 Question 3 (Page No. 204)
Let $X$ be a random variable that is equal to the number of heads in two flips of a fair coin. What is $E[X^2]$? What is $E^2[X]$?
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
708
views
cormen
algorithms
sorting
bucket-sort
expectation
descriptive
1
vote
1
answer
81
Cormen Edition 3 Exercise 8.4 Question 2 (Page No. 204)
Explain why the worst-case running time for bucket sort is $\Theta(n^2)$. What simple change to the algorithm preserves its linear average-case running time and makes its worst-case running time $O(n\ lg\ n)$?
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
660
views
cormen
algorithms
sorting
bucket-sort
descriptive
0
votes
1
answer
82
Cormen Edition 3 Exercise 8.4 Question 1 (Page No. 204)
BUCKET-SORT(A) 1 let B[0...n-1] be a new array 2 n = A.length 3 for i - 0 to n - 1 4 make B[i] an empty list 5 for i = 1 to n 6 insert A[i] into list B[nA[i]] 7 for i = 0 to n - 1 8 sort list B[i] with ... ,B[n-1] together in order illustrate the operation of BUCKET-SORT on the array $A=\langle .79,.13,.16,.64,.39,.20,.89,.53,.71,.42\rangle$
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
416
views
cormen
algorithms
sorting
bucket-sort
descriptive
1
vote
2
answers
83
Cormen Edition 3 Exercise 8.3 Question 4 (Page No. 200)
Show how to sort $n$ integers in the range $0$ to $n^3-1$ in $O(n)$ time.
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
1.1k
views
cormen
algorithms
sorting
radix-sort
descriptive
0
votes
0
answers
84
Cormen Edition 3 Exercise 8.3 Question 3 (Page No. 200)
Use induction to prove that radix sort works. Where does your proof need the assumption that the intermediate sort is stable?
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
585
views
cormen
algorithms
sorting
radix-sort
descriptive
0
votes
2
answers
85
Cormen Edition 3 Exercise 8.3 Question 2 (Page No. 200)
Which of the following sorting algorithms are stable: insertion sort, merge sort, heapsort, and quicksort? Give a simple scheme that makes any sorting algorithm stable. How much additional time and space does your scheme entail?
akash.dinkar12
asked
in
Algorithms
Jun 28, 2019
by
akash.dinkar12
3.3k
views
cormen
algorithms
sorting
stablesort
descriptive
Page:
« prev
1
2
3
4
5
6
7
8
...
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:...