Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Easier?

What's easier?

You usually aren't coding FizzBuzz in production code either

I would say you're constantly coding FizzBuzz. Looping, modulus arithmetic, and conditionals are all over the code I've written. At least with FizzBuzz you have a test of a person's ability to understand a task, break it down, and make sure the logic is consistent. With tree "inversion" it's not even a sensical request, it's utterly useless, and there are countless more interesting and practical ways to test understanding of recursion and trees. Knowledge that, I would bet, isn't even relevant for 90% of programmers, and if tree traversal were relevant then you'd probably want to jump to way more difficult questions (I'm thinking of the Facebook graph, for example).

I agree with the other commenter that it would make far more sense to ask questions like "you need to process data of this type, what provided data structure (e.g. C++'s STL) would you choose?"



I've certainly done tree traversal far more than modular arithmetic (at least at work, for fun I do recreational math problems...)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: