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 log and merges walk it.

  • B-tree

    Databases

    CREATE INDEX in 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.

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).

Illustrative: n = 10 lakh (1,000,000) records at 10⁸ simple operations per second
Big-OOperationsTimewhy
Find one record (binary search, B-tree, TreeMap)O(log n)≈ 200.2 µslog₂ 1,000,000 ≈ 19.9: halve the range about 20 times.
One pass (sum, filter, build a HashMap)O(n)10⁶10 msTouch each record once.
SortO(n log n)≈ 2 × 10⁷0.2 s1,000,000 × 19.9 ≈ 2 × 10⁷.
Compare every pair (nested loops)O(n²)10¹²≈ 2.8 hours10¹² ÷ 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.

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:

  1. Go in order. Every chapter starts with why its structure exists, then the 3D simulation, then Java you can run.
  2. Dry-run before you code: step the simulation with your keyboard and say each move out loud.
  3. Try every problem yourself first. Open hints one at a time, and read the solution only after a real attempt.
  4. Revise with the one-screen summary and the recall cards. Recalling beats re-reading.
  5. Small wins count. One chapter understood well beats ten skimmed. Chalo, start with chapter 1.