Data Structures and Algorithms
What is Data Structures and Algorithms?
Data Structures and Algorithms is the study of how to organise data in memory and the step-by-step procedures that operate on it. A data structure decides what an operation costs; an algorithm decides how many operations you need. Together they determine whether a program finishes in milliseconds or never finishes at all.
Most interview preparation is a list of problems to grind through. That approach does not transfer, because the next problem is never quite the one you memorised. This guide is organised around the structures and the patterns instead — the reusable machinery that lets you attack a problem you have never seen.
Complexity analysis
The measurement tools everything else depends on. If you cannot say what a piece of code costs, every later decision is guesswork.
- Big-O, Big-Theta and Big-Omega
- Time complexity of loops and recursion
- Space complexity and auxiliary space
- Amortised analysis
- Best, average and worst case
Articles on complexity analysis
- Time and Space Complexity Explained2 September 2026
Arrays, strings and hashing
The structures behind the majority of interview questions, and the ones most engineers think they already understand.
- Dynamic arrays and amortised growth
- Two pointers
- Sliding window, fixed and variable
- Prefix sums and difference arrays
- Hash maps, collisions and load factor
- Hash sets and frequency counting
Articles on arrays, strings and hashing
- The Sliding Window Pattern4 September 2026
Linked structures
Pointer manipulation, and the problems that only it can solve cleanly.
- Singly, doubly and circular linked lists
- Fast and slow pointers
- Cycle detection
- Stacks and monotonic stacks
- Queues, deques and circular buffers
- LRU cache implementation
Trees and heaps
Hierarchical data and priority-based access.
- Binary tree traversals, recursive and iterative
- Binary search trees and their degenerate case
- Balanced trees: AVL and red-black
- Heaps and priority queues
- Top-K and streaming median
- Tries and prefix search
- Segment trees and Fenwick trees
Searching and sorting
Binary search is far more general than most engineers realise, and that generality is what interviews test.
- Binary search on a sorted array
- Binary search on the answer space
- Merge sort, quick sort and heap sort compared
- Quickselect and order statistics
- Counting sort and radix sort
- Stability and custom comparators
Recursion and backtracking
Problems that define themselves in terms of smaller versions of themselves.
- The call stack and recursion depth
- Subsets, permutations and combinations
- Constraint satisfaction and N-Queens
- Pruning the search space
- Converting recursion to iteration
Graphs
The structure that models more real problems than any other.
- Adjacency list vs adjacency matrix
- BFS and DFS, and when each is correct
- Topological sort and cycle detection
- Union-Find with path compression
- Dijkstra, Bellman-Ford and Floyd-Warshall
- Minimum spanning trees
Articles on graphs
- BFS vs DFS: Which Traversal Should You Use?6 September 2026
Dynamic programming
Taught as a method rather than a bag of tricks: define the state, find the transition, decide the evaluation order.
- Memoisation vs tabulation
- Identifying overlapping subproblems
- 1D and 2D state spaces
- Knapsack family
- Longest common subsequence family
- DP on trees and bitmask DP
- Space optimisation
Learn all of this in one structured course
A structured, pattern-first course that takes you from the fundamentals of complexity analysis to advanced graph and dynamic programming problems. You learn the reasoning that generalises, not a list of memorised solutions.
View the DSA courseData Structures and Algorithms: frequently asked questions
In what order should I learn data structures and algorithms?
How long does it take to get good at DSA?
Which programming language should I use?
Do I need to memorise algorithms?
Ready for the role you're aiming for?
Pick the course that matches where you are and start this week.
Free · 15 min · No cost, no spam