3 ms·
> Honest question; are you able to recall or extrapolate all of the rotations on the fly in a 45 minute time slice? Yes, easily. The invariants are pretty sim
by eru 11y ago
> Honest question; are you able to recall or extrapolate all of the rotations on the fly in a 45 minute time slice?
Yes, easily. The invariants are pretty simple. For extra fun, I'd try to enforce them via the type system. Though honestly, if you'd try to do red black trees in a language like Java or C++ you'd probably get a headache.
(Just follow Okasaki's simple approach there. See https://wiki.rice.edu/confluence/download/attachments/2761212/Okasaki-Red-Black.pdf https://wiki.rice.edu/confluence/download/attachments/276121...
Functional languages make the typical Google / Facebook style interview much easier.)
> (Thus my "high theory/deep algo" exemption statement, specialists who really have to get that deep I might expect to be familiar with something like this offhand)
I guess my perspective is tainted there. I know some things about algorithms and datastructures, but some people I admire as `specialists' know so much more.