QuickSortIterative
Quick Sort (Iterative).
An iterative variant of Quick Sort that uses an explicit stack instead of recursion, avoiding stack overflow on large inputs. Achieves O(n log n) average-case time with O(log n) stack space. Uses median-of-three pivot selection to mitigate worst-case O(n²).