Colors: Yellow = Current element, Purple = Insert element, Red = Left element, Blue = Comparing, Green = Sorted
Insertion Sort is a sorting algorithm that builds the sorted array one element at a time by inserting each element into its correct position among the previously sorted elements.
How it works:
Time Complexity: O(n²) - compares with sorted portion