Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Create a two-dimensional array of width w and height h. Fill each row of the array with the numbers 1..w randomly shuffled. Pick a sorting algorithm, implement it so that you can run it one elementary sorting step at a time and observe the partial result. For each row in your array, execute a single step of your algorithm. Store the partial result as an image, with the elements of the array interpreted as the hue component of a HSL color coordinate. Repeat until the algorithm has halted for every row in the array. Make an animation out of the resulting frames.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: