# PixSorter

### Watch algorithms sort pixels.

Find the correct position of a pivot point in the pixel array (i.e. all values before are lower, all following are higher), then divide the array at that point. Repeat until the subarrays are so small that moving the pivot sorts them.

Find the correct position of a pivot point in the pixel array (i.e. all values before are lower, all following are higher), then divide the array at that point. Repeat until the subarrays are so small that moving the pivot sorts them.

Start at the beginning. Check if the next value in the pixel array is lower: if so, swap with the current pixel; if not, don't. Move to the next value until the largest number is last. Repeat, stopping one index earlier.

Iterate through the pixel array in reverse, swapping lower value pixels to their correct place at the start of the array. This creates a sorted section which grows with each loop through the pixel array.

Loop through the pixel array to find the lowest value and then move it into the first position. Find the next lowest and move it into position two. Repeat until reaching the end of the array.

- Adding Red, Green & Blue pixel values
- Using the Red pixel value
- Using the Green pixel value
- Using the Blue pixel value