|
|
|
|
|
by chowells
1897 days ago
|
|
Reversing a binary tree isn't some crazy algorithmic knowledge. I'm concerned that so many people here think it is. What's gone wrong that makes people think reversing a binary tree is up there with hand-coding machine learning techniques? Reversing a binary tree is a basic test of whether you can implement a trivial requirement given a spec. How is that not related to what you do every day on the job? You get a lot of requirements, most of which are trivial tasks needed to maintain compatibility with some broken external system that will never get fixed. The solutions are two to five lines of code, once you've taken the time to understand the requirements properly - just like reversing a binary tree. This is neither a task that needs to be studied for nor an unfair pop quiz. It's an easier version of fizzbuzz. (You don't even need to worry about gotchas like getting case ordering wrong the way you do in fizzbuzz.) All it checks is that you have the basic skills necessary for reading and comprehending requirements and then meeting them with trivial code. If you can't do that, what should an interviewer conclude about your capacity to do the job? |
|
A toy implementation of machine learning algorithms (e.g. backprop on an arbitrary neural network) on the CPU, is pretty simple as well.