Hello!
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 followSorting things out
Technically.
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.
Moar Sorting
To continue from before, I’m now up to 6/13 sorting algorithms.
Below will be the new ones in Python and then everything in Java flavor.
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
» How I Changed My Life, In Four Lines :zenhabits
zenhabits.netBrief stories and their nutshell principles from Leo Babauta
常識を覆すソートアルゴリズム!その名も"sleep sort"! - Islands in the byte stream
d.hatena.ne.jp1 Name: Anonymous : 2011-01-20 12:22
諸君!オレは天才かもしれない。このソートアルゴリズムをみてくれ。こいつをどう思う?
#!/bin/bash
function f() {
sleep “$1”
echo “$1”
}
while [ -n “$1” ]
do
f “$1” &
shift
done
wait
Google brings freshness into search results
home.technoguru.inArticle by at 2011-11-04 12:14:58
Categorized in Technology,