3 ms·
I went to a CS high-school (not university) and we studied backtracking in the first or second year. Everyone was supposed to know how to solve this and similar
by rootlocus 9y ago
I went to a CS high-school (not university) and we studied backtracking in the first or second year. Everyone was supposed to know how to solve this and similar problems for tests.
- PeterisP 9y agoSure, you'd know that right after a CS high-school - however, if after that school you go on to work on real problems for a decade or two, then you won't know that anymore, since outside of very specific domains you don't really write such things from scratch anymore; you'd always want to use existing, optimized&tested implementations of all the common and less common data structures and traversal algorithms instead of rewriting them. You forget what you don't use, and this is stuff that you don't use. IMHO the big problem is that they're missing the point on why we ask students do do these algorithm implementations - it's not so that they'd learn how to do that (though a bit of general programming practice is useful), we put them there as hands on exercises so that students would understand the usage of these algorithms better. The implementations are just a learning aid, not a learning goal. Asking to reimplement a red-black tree is somewhat comparable to asking what was shown in a particular instructional video or what practice problems were assigned in that class - checking if you remember the details of a particular teaching instrument.