4 ms·
To spell it out... "reversing a binary tree" here is just being used as a stand-in reference for any CS-y interview question that is neither relevant to the job
by jdeaton 5y ago
To spell it out... "reversing a binary tree" here is just being used as a stand-in reference for any CS-y interview question that is neither relevant to the job, nor particularly difficult to solve but would be much more familiar territory for anyone who has taken traditional CS courses.
The fact that reversing a binary tree is in fact trivial is to help make the point that these kinds of questions are not that useful.
- reedf1 5y agoExactly this - as someone with a non-traditional background (physics) "reversing a binary tree" is as you say completely trivial and I could have "discovered" the answer to the question in slightly slower than real-time in an interview. But people with CS backgrounds don't need to discover it, they have it memorised. These questions aren't testing for original thought or problem-solving ability, they are testing for your skill at memorisation or, to put it more cheekily, regurgitation. I've worked in the industry for years now and I've probably used more maths from my physics degree than I have of the algorithms that I learn for interview.