It's a simple sorting algorithm that builds the final sorted array one item at a time by comparing the new item with the elements of the sorted part of the array and inserting it in the correct position.
Join The Clean Code Studio Newsletter
It's a simple sorting algorithm that builds the final sorted array one item at a time by comparing the new item with the elements of the sorted part of the array and inserting it in the correct position.