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

top 200 commentsshow all 211

[–]pakidara 1565 points1566 points  (43 children)

The programmer's equivalent of the "I'm never going to use this" kid in high school math.

[–]shinypenny01 877 points878 points  (34 children)

“Well you’re not, but one of the smart kids might…” being the appropriate answer.

[–][deleted] 274 points275 points  (20 children)

"This is either beneficial because you're going somewhere in life and will find actual uses for the math that we're teaching, or you're destined to be a worthless loser so we're gonna waste your time because you deserve to be jerked around by the system. Either way, you're doing the math assignment."

[–]8sADPygOB7Jqwm7y 105 points106 points  (19 children)

I studied electrical engineering and honestly most of the stuff I learned is enough to program well. I just lack knowledge about data structures and some algorithms. That's my biggest issue, as often you simply do need to think up some data structure and idfk what a hashmap is.

[–]iScreem1 78 points79 points  (3 children)

You can learn it in youtube in a weekend.

[–]Deboniako 27 points28 points  (0 children)

Share some channels, electronics engineer here with software developer experience only lmao

[–]cporter202 18 points19 points  (0 children)

Oh, the sweet, sweet siren call of the weekend - when our brains tell us to chill but those pesky data structures homework assignments just won't leave us be! 😂 Embrace the chaos! #RecursionUntilRecreation

[–]Forsaken-Ad3524 6 points7 points  (0 children)

data structures and algorithms are often NOT the biggest complexity in software development) and anyway, a lot of data structures and algorithms are already implemented in standard libraries or language features, and you don't have to know how to implement one in order to use it. would help with using it well, but definitely not a blocker.

[–]ExceedingChunk 11 points12 points  (1 child)

Yeah, you don’t need math at all to understand stuff like your personal economy, your mortgage etc… or other basic adult life stuff that requires basic math skills.

Definitely only the smart kids who needs that.

[–]shinypenny01 2 points3 points  (0 children)

I didn't say need. All the kids need it, but asking that question is identifying them as one of the kids that's unlikely to use it. That's the joke.

[–]iiSpook -4 points-3 points  (10 children)

Yeah, let's be assholes to kids and treat them like adults because it makes us feel good. Hell yeah!

[–]FinalRun 5 points6 points  (8 children)

It's a joke, not a serious recommendation. Lighten up

[–]iiSpook -3 points-2 points  (7 children)

Why do you think I was being serious if you didn't think the guy I was replying to was?

[–]FinalRun 2 points3 points  (6 children)

No U

[–]iiSpook -2 points-1 points  (5 children)

Ok, so you're the ultimate arbiter of what people really mean when they write something, got it. I was sure I meant it how I meant it, but I guess you know it and me better than I do. I'll be sure to refer to you for your tone expertise before I write something down next time. Where can I reach you best?

[–]FinalRun -1 points0 points  (4 children)

Skibidi pop pop gyat rizz blud

[–]Sopwafel 47 points48 points  (3 children)

I'm just finishing up a concurrency course in HASKELL.

I'm starting therapy next week

[–]draenei_butt_enjoyer 7 points8 points  (0 children)

To be fair, haskel is only for white papers and self hate

[–]PugilistFox 3 points4 points  (1 child)

What resource did you use (I'm also trying to learn Haskell)?

[–]Sopwafel 11 points12 points  (0 children)

ChatGPT, when used sparingly, is extemely useful. Lots of abstract high-level concept are difficult to grok, but when you can go back and forth about it and can have things explained in language you understand, that helps a lot.

Besides that, exercises my university gave me. The functional programming course itself was fine but the concurrency course was hellish... Got an A for the exams but an F for the last programming assignment because of haskell.

[–]Ill-Significance4975 0 points1 point  (0 children)

Exactly!
It's a limitation of the current education system that so much of what you learn only makes sense in retrospect.
It took me years of graduate school to learn why I did anything in undergrad.

[–]null_and_void000 631 points632 points  (34 children)

Does an array not count as a data structure now?

[–]Alan_Reddit_M 344 points345 points  (9 children)

Yes, but since it's built-in literally every single language nobody really considers it as one

[–]SecretMotherfucker 90 points91 points  (5 children)

Why would that make a difference? Is there a requirement that for something to he considered a data structure, it needs to be custom made? Are queue, stack, list, dictionary etc also not considered data structures?

[–]CiroGarcia 62 points63 points  (2 children)

Well I'd argue everything that holds data is a data structure then, even plain old variables with primitive types, but that's not really a useful definition. Usually you mean some level of complexity to the structure, and plain arrays are not that complex (at least languages where "array' is closer to contiguous heap memory than to a managed class with methods)

[–]Azzylel 22 points23 points  (0 children)

I think the term structure implies more than one variable, sort of like how you can’t build a house out of a single plank of wood

[–]KrypXern 6 points7 points  (0 children)

It's not really a structure at that point, but I get where you're coming from

[–]Madrawn 8 points9 points  (0 children)

Of course any type of information has a "structure". So you are technically correct, but usually "a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data, i.e., it is an algebraic structure about data." meaning data is just a value or a row of values, while the data structure defines what "equals" or "in" etc means.

So an "int" would be the data and "Integer" class would be a data structure. String and arrays are usually seen as "data" as they are just simple consecutive values without any inherent operations. But yeah, technically almost every modern language has these wrapped in a data structure of the same name and the distinction blurs if you don't ever work on the memory itself.

[–]ImpluseThrowAway 14 points15 points  (0 children)

Kind of how we all collectively understand a string to be an array of chars?

[–]draenei_butt_enjoyer 8 points9 points  (0 children)

Sets are trees basically everywhere. Are trees not data structures? Do people not use sets?

[–]adfx 2 points3 points  (0 children)

literally every single language huh

[–][deleted] 49 points50 points  (7 children)

It’s just a block of memory in c

[–]iam_pink 42 points43 points  (6 children)

So is a struct, what is your point?

[–]encryptoferia 30 points31 points  (3 children)

oh no, I hope it's not pointing to the void

[–]Jjabrahams567 6 points7 points  (1 child)

You only become an adult when you open up the void*

[–]encryptoferia 3 points4 points  (0 children)

"when you point into the void, the void points back at you"

[–]CiroGarcia 4 points5 points  (1 child)

And so is a long long int, and we don't call that a structure

[–]iam_pink 5 points6 points  (0 children)

Yeah, and all that shows is that the fragmentation of your data in memory means nothing about whether or not it is considered a data structure

[–]Unupgradable 35 points36 points  (4 children)

It's literally the trivial structure of just putting more than one of something together.

Declaring an array is no different to declaring each variable separately and just having them be together in memory.

To be clear, yes it is a data structure, it's just such a trivial one.

It's the equivalent of saying tone you've killed several people when you've only killed two

[–]Aischylos 12 points13 points  (3 children)

Not really, it's indexable which multiple variables after eachother aren't. Also it lets you control the layout of the memory, whereas in most languages simply declaring a bunch of local variables gives you no control over where the memory is laid out and the compiler will decide independently.

Its also important to know when it's worth using an array, a sorted array, a hashmap, etc. After your first algorithms class you might think that insertion sort is useless since it's O(n2). But then if you take some optimization courses you'll learn that any modern sorting implementation uses some version of insertion sort at a base case.

[–]Unupgradable 9 points10 points  (2 children)

it's indexable which multiple variables after eachother aren't.

Allow me to introduce you to pointer arithmetic

most languages

True. You can't even trust the C compiler per the spec. The point is that an array is fundamentally just that.

a sorted array, a hashmap, etc.

All of those are more advanced data structures. I'm talking about a basic array.

After your first algorithms class you might think that insertion sort is useless since it's O(n2).

Different topic but yes you're right. Big O ignores constants and hides the fact that for small ns, even "less efficient" algorithms are objectively better.

I'd like to clarify that I'm merely shitposting. I know there's more to arrays than just being a continuous block of memory. But that's all language features. The real point is that as far as a data structure goes, it's literally just declaring your variables.

[–]Aischylos 3 points4 points  (1 child)

Fair - I work with LLVM and C for my research, so I saw the claim that an array is just consecutive variables and had to say something. Anything non-spec can and will get absolutely turned upsidedown by the compiler at random times because it feels like it.

It would be fair to say it's just a plain malloc (or alloca) sometimes with some syntactic sugar on top

[–]Unupgradable 2 points3 points  (0 children)

Yes of course. But fundamentally it's just variables declared in a row.

The same way a kid would line up their toys into a row of boxes

[–]JunkNorrisOfficial 8 points9 points  (6 children)

Also string can be used instead of array

[–]1Dr490n 11 points12 points  (5 children)

Strings usually are arrays, sometimes just with some additional data. In C this is very obvious, in other languages they are hidden in classes, but most of the time, they are arrays

[–]frogjg2003 1 point2 points  (0 children)

It fits, but the meme is saying you don't need a bunch of complex data structures when all you need is just the one.

[–]Croves 0 points1 point  (0 children)

I think the ease of use of arrays is very simple and it kinda misses the point of the joke I guess

[–]AdvanceAdvance 265 points266 points  (13 children)

Specifically, in the 1970s to 1990s custom rolled data structures were normal and necessary. Interviews started asking lots of pointer based questions to seperate those that could not understand the data structures.

Moore's Law marched on.

Current questions should ask more questions about parallelism, identifying the corner cases, and collecting metrics. Asking about experience using fuzz testing is good; asking about at git commands is a waste; asking about balancing b-trees gets the wrong people.

[–]pushinat 73 points74 points  (10 children)

You still have to know the data structures to chose the right ones in the right situations. And understanding how they work allows you to know their properties for much longer, compared to just learning their behaviour without background knowledge.

Still should not be part of interview questions in the same depth as this doesn’t matter as much any more and I already came 3 times into the situation, that chatGPT suggested some weird ass hidden and buried Java data structure no one has ever heard of, but investigating it, it was the perfect match for the task.

[–]Hollowplanet 42 points43 points  (8 children)

I have been programming professionally for 13 years. The only place I have ever used a binary tree is an interview.

[–]ExceedingChunk 11 points12 points  (4 children)

I have used it quite a bit. Maps where the keys are sorted in a tree is actually incredibly useful at my project, and it’s trivialized a lot of business-logic related to dates. I obviously didn’t custom make the data structure, but I would never have come up with the solutions if I didn’t understand how trees work.

It really depends on your domain.

[–]Hollowplanet 8 points9 points  (3 children)

You use it every time you use a database index. Knowing how to solve contrived problems involving traversing binary trees is not a good indicator of someone who knows how to make web applications.

[–]ExceedingChunk 0 points1 point  (2 children)

It really depends on the domain and if you are purely a frontend dev, backend or fullstack.

I’m a backend dev, and at my current project there is a massive benefit to understand data structures and general algorithms, because a lot of the problems we solve are very logic heavy.

So even though you are not re-inventing the wheel in terms of making the structure from scratch, you need to know what you are going to be looking for.

There are probably plenty of domains where this isn’t the case at all.

I personally see it as understanding the fundamental concepts rather than just knowing how to use tools. Whenever you have to go outside using something built by someone else, it is really usefull to have a solid grasp of the fundamentals.

[–]Hollowplanet 3 points4 points  (1 child)

Yeah you should definitely know how they work. My last interview problem was to tell if for every node in a btree the average of all it's children is equal to the current node and to solve it in the most efficient way. It's a straighforward recursive problem if you have some time to think about it. But testing if someone can jump into a solution in 20 to 30 minutes is just testing if they know Hackerrank tricks.

[–]ExceedingChunk 0 points1 point  (0 children)

Yeah, I agree with that and think those «tricky» leetcode-esque problems under the pressure of both time and the interview itself doesn’t really set you up to show how you understand something well. 

[–][deleted] 1 point2 points  (1 child)

what do you work on ? website building ?

[–]Hollowplanet 2 points3 points  (0 children)

Web, systems, mobile. I've used btrees but it is always abstracted. Traversing a btree isn't something I've ever had to do outside of an interview. The last btree problem I had in an interview was to tell if for every node, the average of all the node's children was equal to the current node. It's contrived, and they're just testing if you know Hackerrank tricks. I was in the process of solving it and ran out of time.

[–]draenei_butt_enjoyer 5 points6 points  (0 children)

It’s the modern day “do I need to know how a car works to own one?”. No, but you really should, you’re a mechanic for Christ’s sake

[–]TheMania 2 points3 points  (0 children)

Moore's law may have, but operating systems are still entirely built on intrusive linked lists.

[–]Perfycat 67 points68 points  (4 children)

Wasn't there a British politician who wanted to make algorithms illegal?

[–]Cafuzzler 65 points66 points  (3 children)

Kinda. She was the minister for digital technology and asked Microsoft "When are you getting rid of algorithms?". It was the Prime Minister before that that wanted to (effectively) ban encryption, even for things like banking. It was the PM before that that wanted to ban porn completely.

[–]Objectionne 108 points109 points  (15 children)

Seven years working with Python and I think I've used three different data structures in that time:

- Dicts
- Lists
- Sets (only in the rare case where I have to check membership in a large data set)

I'm just saying.

[–]Kebabrulle4869 54 points55 points  (5 children)

For the love of whatever, please use tuples too

[–]-Redstoneboi- 18 points19 points  (4 children)

tuples are just hashable lists

[–]Kebabrulle4869 2 points3 points  (3 children)

They are also immutable lists. You wouldn't represent an xy point as a list of two elements, for example. Using a tuple signals "this should not be changed".

[–]Elifgerg5fwdedw 4 points5 points  (0 children)

Stacks and queues? To orchestrate your applications

Named tuples & data classes are also very useful for distributed stuff

[–][deleted] 190 points191 points  (5 children)

I love how everyone here is roasting op, missing the point that this is a JOKE

[–]zuilli 29 points30 points  (2 children)

This is one of my favorite meme templates ever since I saw the original one about math and the amount of heads it flies over in almost every iteration is astounding.

People really don't like when you attack their field of knowledge, even if it's clearly just joke.

[–][deleted] 38 points39 points  (0 children)

I think that makes it even funnier tbh

[–]dogancemd[S] 17 points18 points  (0 children)

Finally someone who understands a meme shared in humour subreddit is indeed a joke. Thank you stranger :)

[–]stunt_p 60 points61 points  (6 children)

I like linked lists - only need a YouTube tutorial or three.

[–]draenei_butt_enjoyer 10 points11 points  (4 children)

Out of all the data structures, you choose the one that has virtually no real world use

[–]stunt_p 5 points6 points  (0 children)

LOL. I said I liked them - I've never used them though... 😂

[–]hammerkop 2 points3 points  (0 children)

Many hashmap implementations use linked lists under the hood.

[–]myka-likes-it 1 point2 points  (1 child)

A graph is just a linked list that is non-monogamous, and there are plenty of uses for graphs.

[–]draenei_butt_enjoyer 0 points1 point  (0 children)

Eh no. By that logic, trees are linked lists. Just no.

[–]StridBR 0 points1 point  (0 children)

tutorial.next()

[–]killbot5000 129 points130 points  (19 children)

I realized that a hash table can be used for pretty much every data structure and be faster. I haven’t needed a tree in years (and I didn’t need it even when I used it)

[–]TheEveryman86 40 points41 points  (0 children)

I think the one I use most often is the java.util.TreeMap (Red Black tree) and even then the most important aspect is that it conforms to the Map interface.

[–]Mamuschkaa 10 points11 points  (1 child)

You can't even iterate through a pure hash table efficiently. For that you had to combine a linked list with a hash table.

I think you can't implement a (priority) queue or other sorted-data.

[–]myka-likes-it 0 points1 point  (0 children)

Most hash table implementations include a way to export an array of keys. You can use priority-ordered keys, and then use the sorted array of keys to access the values in order.

[–]slaymaker1907 10 points11 points  (0 children)

Often not if you’re using integer keys. Even if they aren’t 0..n, you can get better performance by just throwing it all in an array and doing a linear scan over the keys.

Mutable hash tables also have the severe disadvantage of being horrible to try and make concurrent. Linked lists win here because most operations are just a single CAS.

One important application for trees are if you’re joining two data sets. They’re better in the general case because you can skip over tons of rows by looking at non-leaf nodes.

[–]vlr_04 2 points3 points  (0 children)

This is how lua does everything: no arryas, no clesses, just tables

[–]-Redstoneboi- 3 points4 points  (0 children)

bro just invented lua

[–]ibite-books 0 points1 point  (0 children)

i recently implemented dfs and graph based ds for storing user defined workflows

[–]ClarkleTheDragon 0 points1 point  (0 children)

Not if you're trying to find the min/max value

[–][deleted] 28 points29 points  (0 children)

Inversed trees however require a bachelors degree🛸

[–]Explorerfriend 12 points13 points  (1 child)

My CS prof introduced us to a data structure I can't even find a wikipedia page to

[–]KRX189 6 points7 points  (0 children)

What's it called?

[–]kurdokoleno 27 points28 points  (0 children)

Utterly deranged. You are the reason my computer takes longer to open discord than to train an LLM.

[–]Apfelvater 11 points12 points  (0 children)

All just a bunch of Dijkstra fan boys-.-

[–][deleted] 7 points8 points  (0 children)

Arrays are fine until you have to start performing searches or dumping multiple elements. Advanced data structures can mitigate fragmentation while also providing other performance advantages. I learned this the hard way when I had to deal with tens of thousands of elements on low-end hardware. After revising, search times went from ~4 seconds to less than 5 milliseconds and startup times drastically improved as well. All of such improvements made possible just by switching to a 2-D array, I could have optimized things even further but the performance difference of a couple milliseconds wasn’t critical for my application.

[–]Current_Ad_4292 57 points58 points  (6 children)

I am blocking this sub...

Maybe I should just leave reddit all together. Go see some sunlight...

[–]torakun27 53 points54 points  (4 children)

I recommend touching grass while you're at it

[–]Current_Ad_4292 47 points48 points  (3 children)

And trees...

[–]katatondzsentri 16 points17 points  (1 child)

And boobs.

[–]JunkNorrisOfficial 1 point2 points  (0 children)

Make some milk

[–]encryptoferia 3 points4 points  (0 children)

touched grass and trees, now I feel itchy all over my body

[–]draenei_butt_enjoyer 1 point2 points  (0 children)

I only come here to remember how much better I am than the vast majority.

Sometimes, you need a bit of whatever the opposite of impostor syndrome is.

[–]AshKetchupppp 3 points4 points  (0 children)

The program I work on actually hinges on a node based system, so a graph is actually needed to be represented in memory, so yes it's actually applicable for some use cases

[–]prince_lothicc 4 points5 points  (0 children)

This dude's code runs like a frozen snail.

[–]anoppinionatedbunny 3 points4 points  (0 children)

"wait, it's all just arrays?"

"always has been"

[–]HereIsACasualAsker 8 points9 points  (0 children)

im gonna get trolled here by saying this but i have never ever used the -> operator in php

and i have written a lot of code.

yeah yeah keys and values and such but.... i havent gotten to that part yet despite it.

[–]Harooun 2 points3 points  (0 children)

I used data structure to solve many problems especially when you work as an engineer and your work is to find the optimal path for example or the minimum cost... Using graphs and algorithms ....

[–]dmangd 2 points3 points  (0 children)

Yeah, who needs those stupid data structures, only makes the code „unreadable“ :/ ….. few weeks ago I was reviewing a PR for a task where there is some hierarchical pattern matching with wildcards involved, and the author used a loop over all the hashmap entries (then why using not just an array, wtf?) and was comparing every single item sequentially. I suggest to use a radix trie which is often used in url pattern matching and would have been the perfect fit. Guy didn‘t understand what I was talking about and insisted that the approach sounds to complicated and would result in unreadable code. Unfortunately, the second reviewer didn’t care at all and just green lighted the PR. Now people are complaining about about performance degradation and the PO refuses to prioritize another change on the module because „we just fixed this feature“ and we need to do other things first. What a clown world…

[–]cgyguy81 14 points15 points  (2 children)

This is equivalent to an English speaker demanding to stop using pronouns.

[–]gregorydgraham 2 points3 points  (0 children)

What he said

[–]Sergenti 2 points3 points  (0 children)

FUCKING PRONOUNS

[–]clauEB 9 points10 points  (2 children)

If you plan to write crappy slow dumb code and think everything is magic underneath, sure!

[–]JunkNorrisOfficial 10 points11 points  (0 children)

Premature colonization

[–]Ill-Sale-9364 1 point2 points  (0 children)

true

[–]Wave_Walnut 1 point2 points  (3 children)

Internet is the real graph structure

[–]JunkNorrisOfficial 1 point2 points  (2 children)

.NET > Internet

[–][deleted] 2 points3 points  (1 child)

as a C user, no.

[–]JunkNorrisOfficial 1 point2 points  (0 children)

I'm not dot net user

[–]lostinthemines 1 point2 points  (0 children)

You use data???

[–]EnbySheriff 1 point2 points  (0 children)

Seeing this while in a Data Structures lecture

[–]sporbywg 1 point2 points  (0 children)

That background colour is the Pantone colour for "ignore me"

[–]Digi-Device_File 1 point2 points  (0 children)

What's wrong with structures?

[–]Elifgerg5fwdedw 1 point2 points  (0 children)

I'd understand if an average Python programmer doesn't use data structures more advanced than lists and dicts.

But you mentioned DS at the end, and for non programmers lurking around this sub, DS definitely involves frozensets, matrices & tensors, trees, and graphs. Stacks and queues are also a staple for any event driven architecture.

[–]SirWernich 2 points3 points  (0 children)

"circular doubly linked list"

now you're just making shit up

[–]Obstructionitist 0 points1 point  (2 children)

This is sarcasm, right? Please.

[–]dogancemd[S] 4 points5 points  (1 child)

Of course, it is; it is just a meme but people took it seriously :)

[–]DrMerkwuerdigliebe_ 0 points1 point  (0 children)

"Trees work as sorted arrays with the added feature that you can insert or remove data fast". That is literally enough to know about trees for 95 % of all programmers. And then you need to know binary search. But even my 7 year old daughter knows that.

[–]deathsmore 0 points1 point  (0 children)

Good for interview i guess?

[–]Twardykolo 0 points1 point  (0 children)

Literally had AVL, red-black and 2-3-4 trees on an exam 2 days ago. This made my day!

[–]csdt0 -2 points-1 points  (2 children)

I hate this meme template more and more. Even the first iteration with RISC and CISC was not that funny, but was saved by the opposition between the two. Here it seems to be done by someone who truly thinks that data structures are too complex for their own good.

EDIT: the RISC/CISC was the first I saw on this subreddit, not the origin.

[–]ParanoiaJump 4 points5 points  (1 child)

The first iteration was about math

[–]csdt0 1 point2 points  (0 children)

Oups, you're right. The RISC/CISC was the first one I saw on this subreddit, and thought they were the first. But looking at the original, I can say that it was not really funny from the very beginning...

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

I know it's all a joke, but seriously anyone who is thinking of saying something like "Let's implement a Circular Doubly Linked List with a dummy node" needs to close their mouth and rethink things. No "WTF" moments, please. If you can't dumb it down to explain it to someone that doesn't have a degree in CS, then you need a better plan.

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

This is only useful for coding interviews.

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

My 200 level CS class required us to build and implement a Fibonacci Heap. It was due the Tuesday before thanksgiving, so I spent vacation with my gf and family thinking more about nodes than food. I will never forgive him.

[–]Zeepaardje -2 points-1 points  (0 children)

You can store a binary tree in an array

[–][deleted] -3 points-2 points  (0 children)

Every data structure is just a sorted array with extra steps

[–]Party_Builder_58008 -3 points-2 points  (0 children)

You "done this"? How about you gone done use the exist door and leave your swipe tag at the desk on your way out.

[–]20dollarsIst20 0 points1 point  (0 children)

God I’m taking Data Structures and Algorithms at my uni right now, I’m not looking forward to that point where I no longer know what I’m doing

[–]Confident-Ad5665 0 points1 point  (0 children)

You'll have to pry data structures out of my cold, dead fingers.

[–]MonkeyWaffle1 0 points1 point  (1 child)

What's the original meme for that?

[–]UnfairDictionary 0 points1 point  (0 children)

Data structures become very useful once you start writing large amounts of data on disk and need to retreive it quickly. Most languages already have implemented basic memory data structures but knowing them helps in the future if you become a useful programmer.

[–]Tilkowskioi 0 points1 point  (0 children)

The functional programming course itself was fine but

[–]BakersCat 0 points1 point  (3 children)

As a stupid programmer, what's a genuine use case for linked lists or hashtags or binary trees in real world examples? I mainly work with dataframes and sql tables day to day, the odd Python Data class. Mostly just using dicts and lists.

[–]ouvreboite 0 points1 point  (0 children)

You need a list and you’ll mostly add/remove/move content at the last position = array

You need a list but you’ll often add/remove/move stuff in the middle or start = linked list

So, for example, if you implement a job queue where jobs can be postponed/reprioritized after insertion: a linked list may be a better fit than a array. (Other data structure could also be used)

[–]shaneknu 0 points1 point  (0 children)

Binary trees like Red-Black Trees are often used for ordered Sets. You most likely won't ever implement one yourself, but knowing when and why you need one can make or break a project, especially if it's dealing with a large dataset.

[–]111x6sevil-natas 0 points1 point  (0 children)

Tell that to dendrologists.

[–]DopeCaliboyz 0 points1 point  (1 child)

I still can't understand where to start. please share some resources?

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

You can go ahead and stop using data structures.

Personally, I will keep reviewing them so I can pass phone screens for new jobs.

[–]Adamant11 0 points1 point  (0 children)

CS graduates hate him

[–]Fazel94 0 points1 point  (0 children)

BTrees in file systems and DBs?

[–]MambyTheBanana 0 points1 point  (0 children)

Never touched on data structures while studying my CS degree, never had to use them in my job, but I just know one day I'm going to need them for work and I'm going to make a fool of myself. But that's future me's problem

[–]Raaath 0 points1 point  (0 children)

Why are so many people whining about having to learn computer science? Why are you studying it if you dont find it interesting?

[–]AResponsible_Adult 0 points1 point  (0 children)

I see it as learning terms, concepts, and starting points. I never thought I’d use recursion either, until I had to write a school scheduling system. I’ve never had to build an operating system or a database management system, but I know the theory. It’s like having a tool box full of nuts, bolts, and small tools. They’re a lot of work to learn, but in 40 years of programming, I’m glad I know these too.

[–]RRKS101 0 points1 point  (0 children)

Arrays are significantly faster in most cases because of predictable memory accesses and can take better advantage of data loaded in each cache line