why dsa
Why DSA still matters — in any era, AI included
Short answer: every fast app is fast for the same few reasons, and a DSA round checks whether you know them. The longer answer is below, with real numbers and a source for every claim.
01 · it's everywhere
Every app you use runs on these structures
DSA is not an interview ritual. It's the reason the apps you open every day answer in milliseconds, not minutes.
Look under the hood of a few:
inverted index
Search
A search box never scans every document. Elasticsearch and Lucene keep an inverted index: each word points to the documents that contain it, so a query reads only the lists for its words.
hashing + a graph
Git
Git stores every file and commit under a SHA-1 hash of its content (by default), and each commit points to its parents. Your history is a directed acyclic graph;
git logand merges walk it.B-tree
Databases
CREATE INDEXin PostgreSQL builds a B-tree by default. Bayer and McCreight's B-tree (published 1972) was made for large ordered indexes: find one row among crores without reading the whole table.Dijkstra's shortest path
Network routing
OSPF, a routing protocol used inside large networks, builds its routing table by running Dijkstra's 1959 shortest-path algorithm over a map of the network's links.
Huffman tree
Compression
gzip files and PNG images compress with DEFLATE, which combines LZ77 with Huffman coding. Huffman's 1952 method builds a tree that gives frequent symbols shorter codes.
scale
UPI payments
NPCI reports 2,451 crore UPI transactions worth ₹29.9 lakh crore in August 2026. Spread over 31 days, that's 24,510,000,000 ÷ 2,678,400 seconds ≈ 9,150 payments every second, on average.
sources
- Elastic docs: How full-text search works ↗ docs
- Apache Lucene 10 docs: the terms index is an inverted index ↗ docs
- Pro Git: Git Internals – Git Objects ↗ book
- Git glossary: commits form a directed acyclic graph ↗ docs
- PostgreSQL docs: Index Types ↗ docs
- R. Bayer and E. McCreight, Organization and maintenance of large ordered indexes, Acta Informatica 1(3), 1972 ↗ paper
- RFC 2328: OSPF Version 2 (§16.1 uses the Dijkstra algorithm) ↗ official
- E. W. Dijkstra, A note on two problems in connexion with graphs, Numerische Mathematik 1, 1959 ↗ paper
- RFC 1951: DEFLATE Compressed Data Format ↗ official
- RFC 1952: GZIP file format (uses DEFLATE) ↗ official
- W3C PNG Specification: compression method 0 is deflate ↗ official
- D. A. Huffman, A Method for the Construction of Minimum-Redundancy Codes, Proc. IRE 40(9), 1952 ↗ paper
- NPCI: FAQs on Merchant Discount Rate on select UPI P2M transactions (Sep 2026), Q14 ↗ official
02 · speed and money
Complexity decides speed, and the cloud bill
Big-O sounds academic until you put real numbers in it.
Here is one job, on 10 lakh records, done four ways. The machine is illustrative: 10⁸ simple operations per second, a round, conservative figure (a common rule of thumb is "some hundreds of millions" per second).
| Big-O | Operations | Time | why | |
|---|---|---|---|---|
| Find one record (binary search, B-tree, TreeMap) | O(log n) | ≈ 20 | 0.2 µs | log₂ 1,000,000 ≈ 19.9: halve the range about 20 times. |
| One pass (sum, filter, build a HashMap) | O(n) | 10⁶ | 10 ms | Touch each record once. |
| Sort | O(n log n) | ≈ 2 × 10⁷ | 0.2 s | 1,000,000 × 19.9 ≈ 2 × 10⁷. |
| Compare every pair (nested loops) | O(n²) | 10¹² | ≈ 2.8 hours | 10¹² ÷ 10⁸ = 10,000 seconds. |
Cloud platforms bill for compute time. AWS Lambda, for example, prices functions by the number of requests and by how long your code runs. So the O(n²) version isn't just slower: it burns about 50,000× the compute of the sort (10¹² ÷ 2 × 10⁷). Run it 1,000 times a day and that's about 2,800 CPU-hours a day, against about 3 CPU-minutes.
Now scale it up. Illustrative, not how NPCI's systems are built: at ~9,150 UPI payments per second, a duplicate check that scanned 1 crore (10⁷) stored ids would cost ≈ 9 × 10¹⁰ comparisons every second. That's roughly 900 cores at 10⁸ operations per second, doing nothing else. A HashSet lookup checks about one bucket per payment.
03 · the AI question
AI can write code. You still have to judge it.
AI coding assistants are normal now. In Stack Overflow's 2025 developer survey, 84% of respondents use or plan to use AI tools in their work. In the same survey, more developers distrust the accuracy of AI output (46%) than trust it (33%).
GitHub's own Copilot documentation says it "may generate code that appears to be valid but may not actually be semantically or syntactically correct", and asks you to carefully review and test what it generates.
Research agrees that passing a few tests is not proof. The EvalPlus study (NeurIPS 2023) re-tested code from 26 language models with many more test cases. It caught a significant amount of previously undetected wrong code, and measured pass rates fell by up to 19.3–28.9%.
That review is DSA work. Is this loop O(n²) on 10 lakh rows? Does it break on an empty list, on duplicates, on Integer values above 127? Is a HashMap the right container here? The tool can draft code. Judging whether it is correct and fast enough is still your job, and it's exactly what this course trains.
04 · the interview
Why interviews test DSA
Companies say it on their own prep pages. Amazon's SDE II guide tells candidates to expect interviews on "logical and maintainable code, problem-solving, and data structures and algorithms", and explains why: "Most of the work we do involves storing and providing access to data in efficient ways."
Google's careers resources include coding-interview advice for engineering candidates that covers algorithms and data structures.
Indian product companies run similar rounds, but here the evidence is community-reported, not official. For example, a candidate's write-up of a Flipkart SDE-1 interview describes a timed online coding test followed by array, sorting and heap problems. Formats vary by company, team and year.
Our view: a DSA round is a compact way to watch you break down an unseen problem, pick a structure, reason about its cost and explain your thinking out loud. That is a learnable skill, not a talent test.
sources
05 · your next step
How to use this course
No hype, no shortcuts. DSA is a skill, and skills grow with steady practice. This course is built for exactly that:
- Go in order. Every chapter starts with why its structure exists, then the 3D simulation, then Java you can run.
- Dry-run before you code: step the simulation with your keyboard and say each move out loud.
- Try every problem yourself first. Open hints one at a time, and read the solution only after a real attempt.
- Revise with the one-screen summary and the recall cards. Recalling beats re-reading.
- Small wins count. One chapter understood well beats ten skimmed. Chalo, start with chapter 1.