Hacker News new | ask | show | jobs
by cylentwolf 2566 days ago
What does that help prove though? That I have a good memory? There are better data structures in pretty much all standard libraries out there for your flavor of language. I am sure that my 2nd year CS class didn't go into the nuances of the coding of the linked list. If I remember correctly it was just make sure you can write one by the end of the week and turn it in.
2 comments

> What does that help prove though?

It's a weak filter for “recent grad”, and along with other individually weak filters a tool for under-the-radar age discrimination.

Well it is correlated with being a recent CS grad, just like, for example, knowing that d(sin(x))/dx = cos(x) is correlated with being a recent math or engineering grad.

But that's certainly not what it actually measures, which is basic knowledge about data structures. It just so happens that being a recent CS grad is statistically correlated with knowledge about data structures.

But it's certainly not a necessary condition. I am not any sort of CS grad, recent or otherwise, and I still know how to implement a linked list, because I learn things on my own, and refresh my memory about things I forget over time.

I don’t think I would want to hire someone couldn’t code: a linked list, hash table, and binary tree.

If you can do a AVL or RB tree from memory, that would be a bonus as well.

I'm a big fan of testing basic CS knowledge in technical interviews, which puts me against the dominant narrative on HN.

But even I think knowing how to implement an RB tree off the top of your head is more about having prepared for whiteboard interviews than about actual knowledge or skill.

I'd say it'd be a bonus for me to have a general understanding of how some sort of self-balancing tree works. For example, for red-black trees I'd be happy with stating the invariant about same number of black nodes along any given path and no two red nodes in a row, explaining why this guarantees O(log(n)) worst-case lookups, and also mentioning the basic notion that you can bubble rotations up the tree so the time it takes to do an update or delete is proportional to path length and so again O(log(n)).

I don't think that remembering off the top of your head the exact code for all 7 (or however many it is, idk) different rotation cases provides any additional signal.