• retagged by
397 views

Please log in or register to answer this question.

Position:
Show:

Related questions

8 8 votes
6 6 answers
3.9k
3.9k views
Arjun asked Feb 27, 2025
3,899 views
Suppose that insertion sort is applied to the array $[1,3,5,7,9,11, x, 15,13]$ and it takes exactly two swaps to sort the array. Select all possible values of $x$.$10$$12...
3 3 votes
2 2 answers
557
557 views
Shubham Sharma 2 asked Jun 16, 2025
557 views
Recall the insertion sort algorithm: procedure INSERTIONSORT(A) for i ← 1 to A.length - 1 do key ← A[i] j ← i - 1 while j ≥ 0 and A[j] key do A[j + ...
85 85 votes
3 answers 3 answers
26.8k
26.8k views
Kathleen asked Sep 16, 2014
26,817 views
The usual $\Theta(n^2)$ implementation of Insertion Sort to sort an array uses linear search to identify the position where an element is to be inserted into the already ...
1 1 vote
1 1 answer
158
158 views
Debargha Mitra Roy asked Sep 22
158 views
You have given an array A[] = {12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}. An inversion in an array A is a pair of array indices (i, j) such that i < j and A[i] A[j]. Assume...