How does insertion sort works?



How does insertion sort works?..

Answer / Devendra Kumar Yadav

Insertion sort iterates through the list of items to be sorted, and for each item, it inserts that item into the correct position within the already-sorted portion of the list. This process continues until the entire list is sorted. Its time complexity is O(n^2) in the worst case.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Is hashmap a data structure?

1 Answers  


Write the recursive c function to count the number of nodes present in a binary tree.

1 Answers  


Can treemap have null values?

1 Answers  


Define graph traversals?

1 Answers  


Is an arraylist an object?

1 Answers  


Differentiate between iterator and listiterator.

1 Answers  


Is file a data structure?

1 Answers  


How many sorting algorithms are there?

1 Answers  


Differentiate between compilers and interpreters.

1 Answers   Tech Mahindra,


In Data Structure, write output of given program.

1 Answers   HPCL, Hughes Systique Corporation,


Write a program to sum values of given array.

1 Answers  


Is quicksort divide and conquer?

1 Answers  


Categories