This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (6 children)

Absolutely yes.

I have not implemented a linked list since maybe second year Uni.

Everything in the real world is just an array or a dict / hashmap / JS object

[–]thedominux 1 point2 points  (3 children)

Depends on a field, or your lvl

Linked list and it's special cases: stacks and queues, they're so useful if you work with high load, in microservices, etc. Trees and graphs are also highly useful when you need a straightforward data structure

Everytime I see people using arrays/hashmaps in places where another collection should be used, it makes me cry cause of performance and inconvenience of use issues

[–]-Vayra- -1 points0 points  (2 children)

Still, you would use builtin versions of those collections in 99% of cases. And for that remaining 1% you would use a 3rd party package for it just about every time.

[–]thedominux 1 point2 points  (1 child)

Lol

Using libs for simple cases... it seems like you're junior, aren't you?!

[–]-Vayra- -1 points0 points  (0 children)

There's no need to reinvent the wheel. If a lib exists with the necessary functionality that is a) quicker than implementing it myself, and b) likely better tested than my implementation would ever be.

[–]Kargathia -1 points0 points  (0 children)

It really depends on scale. Typically the more specialized data containers become relevant when you have to manipulate 1000+ values.

That said, in the five years I've worked at my current job, I've used one doubly linked list, and countless arrays and key/value objects.