Insertion Sort, Algorithms, Data Structure Algorithm, Coding Interviews, Job Hunting.
insertion sort algorithm will perform n(n-1)/2 comparisons which shows that the worst case time complexity of insertion sort is O(n2). Average case complexity: In most cases, the average case complexity is equal to the worst case complexity. So the average-case complexity of insertion is also