Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged insertion-sort
4
votes
1
answer
1
GATE Overflow Test Series | Mock GATE | Test 1 | Question: 45
An inversion is a pair of numbers at indices $i$ and $j$, such that $i < j,$ number$[i] >$ number$[j]$. Consider the following array $A:$ $A[\: ]= \{1,-3,-1,-2,5,4,0 \}$ Which of the following is the sorted sequence of the number of inversions of each element ... $0).$ $0,0,0,1,1,1,5$ $0,0,1,2,2,3,4$ $0,0,0,1,1,2,4$ $0,1,1,2,2,3,4$
An inversion is a pair of numbers at indices $i$ and $j$, such that $i < j,$ number$[i] >$ number$[j]$. Consider the following array $A:$ $A[\: ]= \{1,-3,-1,-2,5,4,0 \}$W...
gatecse
311
views
gatecse
asked
Jan 3, 2021
Algorithms
go2025-mockgate-1
sorting
insertion-sort
algorithms
+
–
3
votes
1
answer
2
GATE Overflow Test Series | Algorithms | Test 1 | Question: 28
Consider the code given below, which runs insertion sort: void insertionSort(int arr[], int size) { int i, j, value; for (i = 1; i < size; i++) { value = arr[i]; j = i; while (________ ) { arr[j] = arr[j - 1]; j = j - 1; } arr[j] = ... $(j > 0) \ \&\& \ (arr[j + 1] < value)$
Consider the code given below, which runs insertion sort:void insertionSort(int arr[], int size) { int i, j, value; for (i = 1; i < size; i++) { value = arr[i]; j = i; wh...
gatecse
158
views
gatecse
asked
Aug 18, 2020
Algorithms
go2025-algorithms-1
insertion-sort
+
–
0
votes
0
answers
3
Time complexity
Deepalitrapti
149
views
Deepalitrapti
asked
Sep 1, 2018
Algorithms
time-complexity
insertion-sort
+
–
1
votes
1
answer
4
NPTEL MOOC
Why option (A) is not correct ?
Why option (A) is not correct ?
mcjoshi
768
views
mcjoshi
asked
Aug 23, 2016
Algorithms
sorting
insertion-sort
selection-sort
nptel-quiz
+
–
70
votes
9
answers
5
GATE CSE 2003 | Question: 62
In a permutation $a_1\ldots a_n$, of $n$ distinct integers, an inversion is a pair $(a_i, a_j)$ such that $i < j$ and $a_i > a_j.$ What would be the worst case time complexity of the Insertion Sort algorithm, if the inputs are restricted to permutations of $1. . . n$ with at most $n$ inversions? $\Theta(n^2)$ $\Theta(n\log n)$ $\Theta(n^{1.5})$ $\Theta(n)$
In a permutation $a_1\ldots a_n$, of $n$ distinct integers, an inversion is a pair $(a_i, a_j)$ such that $i < j$ and $a_i a_j.$What would be the worst case time complex...
go_editor
19.8k
views
go_editor
asked
Apr 24, 2016
Algorithms
gatecse-2003
algorithms
sorting
normal
insertion-sort
+
–
0
votes
1
answer
6
Number of Inversions
A) 192 B) 120 c) 188 D) 176
A) 192 B) 120 c) 188 D) 176
Himanshu1
718
views
Himanshu1
asked
Dec 16, 2015
Algorithms
algorithms
inversion
insertion-sort
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register