News for hackers. Stuff that matters.
Re:Coding interviews are stupid (ish) by pseudalopex on Tuesday May 07, 2024 @05:47PM (#40291915)
> I've had to work on tree traversal stuff multiple times in my life, anything low level GUI related will work with trees a ton.

How many times did you have to write tree balancing code with no reference materials?

Re:Coding interviews are stupid (ish) by Paul-Craft on Tuesday May 07, 2024 @06:05PM (#40292096)
Bingo. You forgot to add "with someone literally looking over your shoulder," though.

I've written AVL trees, B-trees, red black trees, and a bunch of other things people have named here. But, right now, without looking at any references, I couldn't even tell you how to balance an AVL tree, much less sit down and write out code for it.

Re:Coding interviews are stupid (ish) by tharkun__ on Tuesday May 07, 2024 @10:39PM (#40293830)
That's why these interviews select for recent grads. Or leet code studiers.

Yes we've all done this in university. We've learned the theory. We had to write an implementation of this or that algorithm in whatever language the university made us use.

And we also know that great minds took a long time to come up with these in the first place. These "basic algorithms" are not something you think up in 5 minutes after first learning that computers exist or that some problem exists.

Bin packing algorithms are another such thing. Sure ask me interview "questions" like "please prove whether P=NP".

Eff off Mr. or Mrs. interviewer!

Re:Coding interviews are stupid (ish) by devbent on Tuesday May 07, 2024 @10:26PM (#40293766)
The exact same number of times I've been asked that during an interview: 0!

I do ask tree traversal questions when interviewing because I've had to traverse a lot of trees so I think being able to do an in order traversal of an already sorted binary tree (which is only a handful of lines of code) is fair game.

Re:Coding interviews are stupid (ish) by jjgreen on Wednesday May 08, 2024 @05:50AM (#40296107)
Just the once? [maths joke]
Re:Coding interviews are stupid (ish) by pseudalopex on Wednesday May 08, 2024 @02:43PM (#40301552)
In order traversal is simpler and more practical than the questions xandrius asked about.