Category

DSA

Data structures and algorithms (DSA) are the two halves of efficient programming. A data structure organises data in memory, and an algorithm is the method that searches, sorts or transforms it. Knowing what each operation costs helps you pick between an array, a hash map or a tree, find out why code is slow, and solve interview problems with confidence.

I'm Imran, and this is where I write about data structures and algorithms the way I use them: what each structure costs, which pattern fits which problem, and where the textbook answer breaks in real code.

DSA is short for data structures and algorithms. A data structure decides how your data sits in memory and what each operation on it costs. An algorithm is the step by step method that works on that data. Together they decide whether code finishes in milliseconds or times out, which is why interviews test them and why production systems depend on them.

The 20 topics below start with arrays and strings, move through the core patterns such as hashing, two pointers, sliding window and binary search, and end with graphs, greedy methods and dynamic programming. Each article gives code in Python 3.12 and Java 21, states the time and space cost of every approach, and finishes with practice problems.

I publish one topic at a time so each one gets a proper review. The topics marked coming soon will appear here as they go live.

Topics in order

  1. 01
  2. 02

    Hashing

    Coming soon
  3. 03

    Two Pointers

    Coming soon
  4. 04

    Sliding Window

    Coming soon
  5. 05

    Prefix Sum

    Coming soon
  6. 06

    Binary Search

    Coming soon
  7. 07

    Stacks and Queues

    Coming soon
  8. 08

    Monotonic Stack

    Coming soon
  9. 09

    Linked Lists

    Coming soon
  10. 10

    Recursion

    Coming soon
  11. 11

    Backtracking

    Coming soon
  12. 12

    Trees and BSTs

    Coming soon
  13. 13

    Heaps

    Coming soon
  14. 14

    Tries

    Coming soon
  15. 15

    Graphs

    Coming soon
  16. 16

    Topological Sort

    Coming soon
  17. 17

    Shortest Paths

    Coming soon
  18. 18

    Union-Find

    Coming soon
  19. 19

    Greedy

    Coming soon
  20. 20

    Dynamic Programming

    Coming soon

3 articles