Data Structures and Algorithms
How to organise data and design efficient algorithms — the core of computer science and coding interviews.
A data structure organises data so certain operations are fast; an algorithm is a step-by-step method that uses them. Choosing the right pair can turn a program that takes hours into one that takes milliseconds. Start with Big-O notation, then work through the structures and algorithm families below.
Sub-topics (11)
Big-O Notation
Describe how an algorithm's time or memory grows as the input size grows.
Arrays and Dynamic Arrays
Contiguous memory with O(1) indexing; dynamic arrays grow by reallocating.
Linked Lists
Nodes connected by pointers: cheap insertions anywhere, but no random access.
Stacks
Last-in, first-out (LIFO): push and pop at the same end.
Queues
First-in, first-out (FIFO): add at the back, remove from the front.
Hash Tables
Map keys to array slots with a hash function for O(1) average lookups.
Trees
Hierarchical structures of nodes with parent–child relationships.
Graphs
Vertices connected by edges — model networks, maps, circuits and dependencies.
Sorting Algorithms
Arrange data in order — and why the choice of algorithm matters.
Binary Search
Find an item in a sorted array by repeatedly halving the search range — O(log n).
Dynamic Programming
Solve problems by combining solutions to overlapping sub-problems, storing each result once.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.