IMO it's a rather goofy data structure that exists solely to annoy candidates.
I don't ask LL questions because it's too easy and most variations are anyway banned
Banned 🤨
Banned?
Intrusive containers anybody?
I am interested and would like to hear more
LL exists solely to annoy candidates? Kooky!
Not really? Every data structure at its core is composed of either array(s) or linked list(s). It’s a fundamental data structure
If you think it's annoying that just mean you are not good at it (although it looks simple). Good candidate should breeze through LL questions with all corner cases considered.
Yeah there's nothing else that screams great candidate than being able to fuck around with prev/next logic to reverse a linked list in 5 minutes.
Linked lists are practical and commonly found in OS/systems code. Memory allocators, schedulers, caches, etc
They’re so easy to solve now. I don’t ask them. Except one that I’m still rather fond of.
Which one?
I found LL pretty useful, especially when using a queue in a production code
LOL I wish all my interview questions where linked list
I consider linked list problems a bit easier than arrays and strings because there are fewer types of patterns with such problems. You can ask a candidate a random array or string question, and he/she will have a good chance of not knowing the general approach to solving it
True, they're usually easier, and all the fun stuff is with trees. But there's a few patterns you still need to know "just because".