Data Structures
Data structures and algorithms, from core concepts to system design
Learn how data structures organise memory, how algorithms operate on that memory, and how to select complementary pairs to design scalable systems.
Plain words. One step at a time. Nothing here assumes you already know the idea.
The idea
A data structure is a specialised format for organising, processing, retrieving, and storing data in computer memory. An algorithm is a finite, step-by-step sequence of well-defined instructions designed to perform a specific computation or solve a given problem. While data structures represent passive arrangements of state, algorithms represent the active procedures that transform and query that state.
Consider a public library.
You will need. Basic programming syntax in Python · Understanding variables, loops, and conditional statements
One pass
Step 1 of 3
Every program consists of two fundamental components: data and operations. A data structure answers the question of how information rests in memory. For instance, storing a group of user identifiers can be done in a contiguous list where elements sit next to each other, or in an associative mapping where each identifier maps directly to a location.
Smallest version
Linear search algorithm operating on an array data structure
def contains_item(data: list[int], target: int) -> bool:
for item in data:
if item == target:
return True
return False
numbers = [2, 4, 7, 9]
found = contains_item(numbers, 7)
print(found)Keep these
- A data structure stores and arranges elements in memory.
- An algorithm executes a finite series of steps to compute a result over data.
- An algorithm's implementation and efficiency directly depend on the underlying data structure.
Try one
Unsorted to set lookup
easy
Also on MonksBit
- Types of Data Structures: Linear vs. Non-Linear Explained Learn how linear and non-linear data structures organise memory, navigate sequential versus branching relationships, and guide algorithm design. Data Structures · 7 min
- Database Normalization vs. Denormalization: From Data Anomalies to High-Throughput Systems Design clean relational schemas up to Third Normal Form and selectively denormalize storage to optimize real-world read latency. System Design · 9 min
- REST API Architecture: Designing Stateless Services for Production Systems Design, implement, and scale robust RESTful services using standard HTTP semantics, stateless resource modeling, and cache validation. System Design · 9 min
- Model View Controller architecture, from core components to web frameworks Understand and build Model-View-Controller architectures, decoupling domain logic, presentation layers, and user interactions cleanly. Algorithms · 9 min
- Layered Software Architecture: Structuring Scalable Systems Across Boundaries Design, implement, and test modular enterprise applications using strict presentation, business, and data access layers. System Design · 9 min
- Monolithic architecture, from single processes to modular systems Learn how to build, structure, and scale monolithic software architectures effectively while avoiding common design pitfalls. System Design · 7 min
- Client-server architecture, from raw sockets to scaled distributed systems Learn how client-server architecture works, implement custom TCP communication in Python, and scale services with connection handling and load distribution. System Design · 9 min
- How to approach a system design problem, from scope to architecture? Master a structured framework to clarify requirements, estimate scale, design high-level architectures, and resolve deep distributed bottlenecks. System Design · 8 min
- Why system design matters in software development? Learn how architectural decisions govern software scalability, reliability, and maintainability by evolving a single-node service into a resilient system. System Design · 8 min
- System design fundamentals, from single servers to distributed architectures Learn how to architect scalable systems by progressing from single-node web servers to load-balanced, cached, and partitioned distributed services. System Design · 9 min
- Designing a URL shortener from scratch to scale Design, implement, and scale a production-ready URL shortener service while learning key system design patterns. System Design · 10 min