Tumblr is where tens of millions of creative people around the world share and follow the things they love.Sign up to find more cool stuff to follow
Sorting things out
Sorting algorithms employ multiple approaches to complete the same task: put things in order.
Up to date, I’ve managed to master 3 techniques, two of which were my own idea (which happen to overlap with the world’s two simplest sorting techniques). Below is the source code for all three.
Tetris Printer Algorithm
Interesting (if almost pointless) demonstration of code which can construct images based on the rules of Tetris:
By rotating, positioning and dropping a predetermined sequence of pieces, the Tetris Printer Algorithm exploits the mechanics of Tetris to generate arbitrary bitmap images.
For a (really) in-depth overview of the project, you can find one here