Heap sort using an array impressed me as an undergrad.
FFT continues to amaze me as a scientific programmer.
21–30 of 507 posts
Heap sort using an array impressed me as an undergrad.
FFT continues to amaze me as a scientific programmer.
I love the idea of adding not _structure_ but _randomness_, in order to better find a solution to some problem.
So, I'll mention Monte Carlo integration. It's very simple to implement, it was one of the first tasks my first CS professor gave freshman students, and he did it for the same reason I love it; it gives such profound insights about how computers can solve complex mathematical problems humans can't. I shiver every time I solve a problem with a Monte Carlo method.
Being able to do the full set of boolean operations on shapes with just `min` and `max` operations is pretty cool. Doubly so because boolean operations on standard geometry is such a difficult, messy problem.
It took me days/weeks of processing to understand it (and appreciciate the problem(s) it solves).
and
- Marching Cubes
https://en.m.wikipedia.org/wiki/Fast_inverse_square_root
I especially love the story around it.
For data structures: Either Hash Array Mapped Tries (HAMT; used in most immutable data structures) or Log-structured Merge Trees (LSM-Trees; an important concept for databases, mainly very useful because random access on "spinning rust" is very slow).