@blakeyrat said:
On the contrary, you're better off with someone who hasn't dug deep into the implementation of various data structures, because I can guarantee you that idiot is going to over-complicate the FUCK out of the solution.[/QUOTE]
Sure. But the guy that is going to use a hash table where a plain array would have been more than OK -- no, that guy is totally OK with you. That's not overcomplicating the solution, that's actually making it JavaScript-y!
[quote="blakeyrat, post:52, topic:3699"]The question wasn't about using them, it was about implementing them. And there's a good chance he'll never use any data structures, based on the job description. That's someone else's job.
All of the OP's 4 "self-confidence breaking" questions are about
using binary trees. What made you think this was about implementing them? Maybe there is a 5th question that I am not aware of? Even my snippet above was about
walking binary trees.
@blakeyrat said:
Only for C and C++ programmers. The rest of the world has moved on past those shitty languages, and implementation details like this no longer matter.[/QUOTE]
What's your favourite language? C#? Contains a LinkedList class. Java? Contains a LinkedList class. PHP? The default arrays might actually becomed linked lists in certain usecases (PHP is TRWTF of course).
Even C++ contains std::list. We are not talking about implementation details here, we are talking about how to use them and when. When is a LinkedList better than a array? When is a HashSet better than a TreeSet? etc. etc.
[quote="blakeyrat, post:52, topic:3699"]
Yup.
Look, in the 99.5% of cases where it doesn't fucking matter, then I'll implement the one that reads cleanest.
In the 0.5% of cases where it might matter, I'll 1) measure to figure out if it really matters (almost always no), and 2) maybe call some dickhead like you in to take a look.
[/QUOTE]
Ok, good luck with that on an interview. Especially when the interviewer is the "dickhead" that gets the problems solved instead of just randomly typing on the keyboard something that resembles code.
[quote="blakeyrat, post:52, topic:3699"]
If the interviewer were asking a practical question about the DOM tree, I'm guessing this post would not be on the DailyWTF. Because that'd be a sensible question for someone looking for a job in web UIs and web services.
So you're basically arguing that I need to embellish the original binary tree questions with some DOM and HTML buzzwords?
Maybe
Implement a method to sum the values of all the children textboxes in a DOM tree would have made things easier for you?
"Senior Software Engineer" my ass.
Related: http://blog.codinghorror.com/why-cant-programmers-program/ (also using Discourse by the way).