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 follow

Sorting 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.

Read More

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.

Read More

Tetris Printer Algorithm

image

image

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

常識を覆すソートアルゴリズム!その名も"sleep sort"! - Islands in the byte stream

d.hatena.ne.jp

1 Name: Anonymous : 2011-01-20 12:22
諸君!オレは天才かもしれない。このソートアルゴリズムをみてくれ。こいつをどう思う?

#!/bin/bash
function f() {
sleep “$1”
echo “$1”
}
while [ -n “$1” ]
do
f “$1” &
shift
done
wait

“#!/bin/bash function f() { sleep "$1" echo "$1" } while [ -n "$1" ] do f "$1" & shift done wait example usage: ./sleepsort.bash 5 3 6 3 6 3 1 4 7”

4chan BBS - Genius sorting algorithm: Sleep sort
Loading more posts...