Is DSA Still Needed in the AI Era?
Everyone is saying DSA is dead. I believed it too. Then one night in production taught me otherwise.
Let me be very honest with you from the start.
Six months back I had stopped doing DSA completely. My LeetCode streak was dead. My notebook of graph problems was lying somewhere under my bed. Why would I waste time on linked lists when Copilot and ChatGPT and Claude can write the full function in ten seconds?
Every second post on LinkedIn was saying the same thing. “DSA is useless now.” “Companies will stop asking it.” “Just learn prompting yaar.”
I agreed with all of it. I was shipping features faster than ever. My manager was happy. I felt like a 10x developer.
Then came that one Thursday night.
The night everything broke
I am Himanshu. I work as a backend developer at a small startup. We handle orders for local sellers.
That week I got a simple task. Find duplicate orders before sending them to the payment system. Same customer, same product, same amount within a few minutes means it is probably a duplicate.
I opened my AI tool and typed the requirement. Within seconds I had clean code. Proper variable names. Comments also. I tested it on 500 sample orders from staging. Worked perfectly. Raised the PR. Got approved. Deployed on Thursday evening.
At 2:47 AM my phone started ringing.
The order API was timing out. Sellers were complaining. Payments were stuck. My manager was on the call and his voice was not very friendly.
I opened the code again with half sleepy eyes. And there it was. Sitting quietly inside that beautiful AI code.
A loop inside a loop.
For every order it was checking every other order. On 500 rows that is around 2.5 lakh comparisons. Nothing. Your laptop does it before you blink.
But production had 2 lakh orders that day.
2 lakh multiplied by 2 lakh is 40 billion comparisons.
No server in this world is going to finish that before a seller in Indore loses his patience.
The red line is what AI gave me. The green line is what I should have asked for.
The fix took 10 minutes. Knowing the fix took 2 years.
I didn’t ask AI for help this time. I just knew.
Make a key from customer id plus product id plus amount. Put it in a HashSet. While going through the orders check if the key is already there. If yes it is a duplicate. If no add it and move ahead.
One loop. O(n). 2 lakh operations instead of 40 billion.
Deployed at 3:20 AM. API came back to normal in two minutes.
Sitting there at 3:30 AM with cold chai I realised something which changed my whole thinking.
AI didn’t make a mistake. AI gave me exactly what I asked for. I asked for code that finds duplicates. It found duplicates. It never knew my table would have 2 lakh rows. It never knew the API had a 30 second timeout. That context was in my head. Not in the prompt.
And the only reason I could fix it in ten minutes was those boring evenings in college where I solved “Two Sum” with a HashMap and felt like a genius.
What AI really can’t do (yet)
After that night I started noticing these gaps everywhere. Here are the ones I see almost every week.
1. AI doesn’t know your scale.
It writes code for the example you gave. Your production data is 1000 times bigger. Only you know that. And only DSA tells you what happens when n grows.
2. AI can’t judge its own output.
It will give you an O(n²) solution with the same confidence as an O(n) solution. Both look clean. Both pass small tests. If you can’t read complexity you can’t tell which one will kill your server.
3. AI doesn’t debug your 3 AM problem.
When things break in production you don’t have time to paste 15 files and explain everything. You need to look at code and feel where the problem is. That feeling comes from practice.
4. AI can’t sit in your interview.
Most product companies in India still do live DSA rounds. Many have moved to in person or proctored rounds because of AI cheating. A friend of mine got rejected from a good company last month. He could build full apps with AI. He couldn’t explain why he used a list instead of a set.
5. AI can’t defend your design in a meeting.
Get Himanshu Singour’s stories in your inbox
Join Medium for free to get updates from this writer.
When your senior asks “why not a heap here” you can’t say “ChatGPT told me”. You need to know the tradeoff yourself.
The third box is where your salary comes from.
So is DSA still needed?
Yes. But not in the way we were taught.
You don’t need to mug up 500 LeetCode problems anymore. That era is going away. AI can recall syntax better than any of us.
What you need is the thinking behind DSA.
- Looking at code and knowing its time complexity in five seconds
- Knowing when to use a HashMap vs a Heap vs a Tree vs a Graph
- Smelling a nested loop on large data from far away
- Breaking a big messy problem into small pieces before you even open the AI chat
Think of it like this. AI is a very fast car. DSA is knowing how to drive. A Ferrari with a person who can’t drive is not fast. It is just dangerous.
My new routine
After that night I made a small change. Nothing crazy.
- 30 minutes daily. One or two problems. Only patterns. Sliding window, two pointers, hashing, BFS and DFS, heaps, DP basics.
- Every AI generated function gets one question from me. What is the time complexity and what happens at 1 lakh rows?
- Solve first, then check with AI. Not the other way around.
Within three months my code reviews became sharper. I caught two more O(n²) issues in other people’s PRs before they reached production. My manager noticed. That is the kind of thing that shows up in appraisals.
Final words
AI is doing 99% of the typing now. That is true and I am not fighting it. I use AI every single day.
But the remaining 1% is judgement. And judgement is the part they pay you for.
That 1% is what woke me up at 2:47 AM. And that 1% is what let me go back to sleep at 3:30.
So no bhai. DSA is not dead.
It just stopped being about writing code. Now it is about knowing when the code is wrong.
Where I practice now
After this story many friends asked me one thing. Bhai where do you practice? So I built two things for exactly this problem.
This is everything I wish I had when I was preparing. DSA patterns explained with real interview context. High Level Design and Low Level Design without skippable topics. Real system design scenarios that come up in 90% of interviews. One subscription and everything is open. No hidden paywalls.
- Learn DSA by patterns, not by mugging 500 problems
- HLD and LLD in one place, built for interviews
- Scenario based cross questioning like a real interviewer
- Weekly engineering newsletter with system design stories
2. CodEyes.in
Once you start practising you want to see your growth. CodEyes connects LeetCode, Codeforces, CodeChef, GitHub, Medium and Substack into one profile. Your streak, your contest rating and your submission heatmap. All in one link.
- One public profile link you can put on your resume
- Track your daily streak and contest rating across platforms
- Contest tracker so you never miss a contest
- Get your coding profile roasted for honest feedback
Learn on AlgorithmXlr8. Track on CodEyes. That is the full loop.
If this hit home for you, give it a clap and share it with that one friend who says “DSA is useless now”. Tell me in the comments. Has AI code ever broken something for you in production?







