Sorting...

Ever thought about how computers do sorting? I came across a very good YouTube video that explains it very well in the form of my wee doodle here. Basically compares 2 numbers at a time in a waterfall sequence. In each box, big number goes forward, small one drops down.

I stored it under interesting but not likely to be used knowledge until I came across a puzzle that required the sequence exactly.

Not the most efficient solution (yet!) but it got the desired result that's been eluding me for months.

Comments
Sign in or get an account to comment.