Sorting Visualizer
SlowFast
Insertion Sort
Insertion sort builds the final sorted array one element at a time, by repeatedly taking the next unsorted element and inserting it into its correct position among the previously sorted elements. This process continues until all elements have been inserted into their proper place, resulting in a sorted list.
Time Complexity
Worst Case:O(n²)
Average Case:O(n²)
Best Case:O(n)