4 ms·
Sure but one can understand quicksort, then forget how to implement it a month later. Or not be able to modify it to produce quick select. So really, you do ne
by whycombagator 5y ago
Sure but one can understand quicksort, then forget how to implement it a month later. Or not be able to modify it to produce quick select.
So really, you do need to memorize stuff. Maybe not questions per se, but certainly patterns and techniques (on top of understanding the fundamentals)
- Toutouxc 5y agoI still don't see the memorization part. The last time I touched quicksort was at uni, three years ago, I still understand how it works (choose a pivot, partition the rest according to the elements' relation to the pivot, then quicksort the partitions), and I'm pretty sure I'd be able to implement it right now. Maybe not in C, but in Ruby, absolutely. Understanding is the hard part, the implementation should be the automatic part. I mean, we're programmers, right? We know how to shuffle arrays around and return values from functions.
- uglygoblin 5y ago"I still understand how it works" is memory. Maybe you have an amazing memory but imagine 15 years later.
- Taylor_OD 5y agoRight. At some point I could write quick sort out in my head, on paper, in a terminal. Right now? Not a chance.
- deleted 5y ago[deleted]