Insertion Sort
Builds the sorted array one element at a time by inserting each element into its correct position.
Time ComplexityBestO(n)AvgO(n2)WorstO(n2) Max OperationsWorst-case bound2n(n−1) Used for efficiency calculation in Stats Panel
Space ComplexityAuxO(1) In-place — key variable + indices only