In each image below, we start with a row of unsorted pixels at the top, and then watch as a sorting algorithm progressively sorts the pixels, eventually arriving at a fully sorted row at the bottom…