127 private links
The images allow to easily, visually take in what a sorting algorithm did over time, as it took the list from an unsorted, random state to a completely sorted state. On the horizontal axis, we have a list of numbers, represented as a single line of colors. On the vertical axis, there is time. From the top of the image to the bottom of the image, there is the list of numbers (the line of colored pixels) from a random ordering to a “sorted” rainbow line, by applying each kind of sorting algorithm one step per row.
This is not a new sorting algorithm, but an idea when we need to avoid swapping of large objects or need to access elements of a large array in both original and sorted orders.
A common sorting task is to sort elements of an array using a sorting algorithm like Quick Sort, Bubble Sort.. etc, but there may be times when we need to keep the actual array in tact and use a “tagged” array to store the correct positioning of the array when it is sorted. When we want to access elements in sorted way, we can use this “tagged” array.