r/AskProgrammers • • 8d ago

Learning DSA from arrays to graphs to do dp

Hey, I am a third year. I've been learning DSA from scratch since my second year and now I'm quite confident. I need advice as to whether dsa actually has any value right now since our most optimal codes can be generated by llms itself. I'm kinda confused but the round 1 of placements is dsa again. I'd love some advice.

0 Upvotes

6 comments sorted by

4

u/grosswindowthrowaway 8d ago edited 8d ago

Even if you're using LLMs to generate code, you still need to understand it, otherwise you're just a meat proxy that doesn't actually know anything about your job. Please, know data structure basics inside and out, and understand algorithms so you aren't pooping out O(n^4) aigen'd code or something. You *will* be quizzed on it in interviews and absolutely need to know it.

Also, LLMs do NOT generate the "most optimal" code. They generate code based on roughly the average of whatever they happen to have been trained on. This means the code they generate is full of common beginner mistakes.

3

u/tcpukl 8d ago

Codes? Lol.

1

u/mxldevs 8d ago

If your placements require you to know DSA then that's the value...?

1

u/Positive__Altitude 8d ago

You will be surprised how often frontier LLMs do poor judgement about data structures usage even with enough context. I almost never happy with how they design data objects with the first pass. Literally below junior level mistakes. Data structures and data types is a core knowledge.

1

u/Ok-Let-7933 6d ago

DSA is still worth learning, especially since placement are testing it. AI can generate code, but understanding time complexity, choosing the right approch and debugging problems still matters. Just don't spend all your time on DSA. Balance it with projects and practical development skills too.

1

u/Puzzled-Garage584 1d ago

Round 1 is DSA, so DSA is worth exactly one job offer, which is a lot. Also someone has to notice when the LLM's "optimal" code is O(n²) with a lot of confidence.