edited by
589 views
2 votes
2 votes

An unsorted array has this property that every element in it is at most $d$ distance from its position in the sorted version of the array (where $d$ is a positive integer smaller than the size of the array).

Which among the following algorithms is best suited to sort this array?

  1. Insertion Sort
  2. Quick Sort
  3. Heap Sort
  4. Merge Sort
edited by

1 Answer

Best answer
2 votes
2 votes
selected by
Answer:

Related questions

3 votes
3 votes
1 answer
2
Bikram asked May 14, 2017
297 views
What is the worst case time complexity to calculate the depth of a directed acyclic graph (DAG) with ‘$V$’ vertices and ‘$E$’ edges?$O\left ( V+E \right )$$O\left...