Articles on algorithms, data structures and CS fundamentals, written to go with the visualizers.
From O(N²) brute force to an O(N) hash map, broken down step by step.
Learn how to check if two strings are anagrams using sorting and hash maps, with clear examples, real-life analogy, and complexity analysis.
Find the first occurrence of a substring in a string. Learn brute-force and pointer-based approaches with dry runs, algorithms, and complexity analysis.
Split your search space in half with every step. The go-to way to search a sorted array.
Learn the recursion and the merge step behind a stable O(N log N) sort.
Pick a pivot, herd the smaller values to its left, and recurse. Why quick sort is O(N log N) on average, O(N²) at worst, and still the default in practice.
Get the node pointer updates right and reverse a singly linked list iteratively.
Learn top-down memoization to optimize exponential recursions down to linear efficiency.
Explore recursive tree traversals. Learn how to traverse a BST in sorted ascending order.
Understand the simplest search algorithm. Learn when linear scan beats binary search and how to implement it in every major language.
Use the two-pointer pattern to solve pair-sum, palindrome, and sliding-window problems in linear time.
Dive deep before backtracking. Learn recursive and iterative DFS with applications in cycle detection, topological sort, and more.
Explore graphs level by level using a queue. Learn how BFS finds shortest paths and how to apply it to grids and trees.
Understand nodes, pointers, and dynamic memory. Learn to build, traverse, and modify singly linked lists from scratch.
Learn the LIFO principle with push, pop, and peek operations. See how stacks power undo systems, expression parsing, and DFS.
Learn the FIFO principle with enqueue, dequeue, and front operations. See how queues power BFS, task scheduling, and more.
A gentle introduction to programming fundamentals: variables, conditionals, loops, functions, and arrays, with examples in five languages.
Print right triangles, pyramids, inverted triangles and diamonds: the visual way to learn nested loops.
The simplest sort: walk the array swapping adjacent pairs until everything bubbles into place. Learn the early-exit optimisation that gives O(N) best-case time.
Find the minimum, swap it into place, repeat. Selection sort minimises swap count, making it the right choice when writes are expensive.
The way you sort a hand of playing cards. Fast on nearly-sorted input (O(N) best case) and the foundation of Python's real-world Tim Sort.
How O(1) lookup actually works: hash functions, the collision problem, and the two resolution strategies every hash map uses.
The vocabulary (root, leaf, depth, height), how to build a tree in code, and why recursion is the tree's best friend. Prep for DFS and BFS.
Three orderings, one skeleton. Pre-, in- and post-order differ only in where the visit happens. Includes the post-order pattern behind Path Sum and LCA.
Visit nodes level by level using a queue. Includes the level-by-level grouping variant and where BFS shows up in graph problems later.
Understand what data structures are, why they matter, and how to pick the right one. Arrays, hash maps, stacks, queues, trees, and graphs, explained simply.
A clear introduction to algorithms: what they are, their four key properties, how they differ from programs, and the major algorithm families you will encounter.
Big O notation from O(1) to O(n!). Learn why constants are dropped, how to calculate complexity from code, and why it matters at scale.
Learn how to measure memory usage with Big O, understand stack space from recursion, and master the fundamental time vs space trade-off every algorithm makes.
How a binary heap keeps the min (or max) at your fingertips in O(log n), and why it powers priority queues.
How the left-smaller / right-larger rule turns a tree into a searchable, ordered structure, plus validation and kth-smallest.
Adjacency lists vs. matrices, directed vs. undirected, weighted vs. unweighted: the vocabulary behind every graph algorithm.
Greedily expand the closest unsettled vertex to find shortest paths in a graph with non-negative weights.
Relax every edge V−1 times to handle negative weights, and detect negative cycles along the way.
The choose / explore / un-choose template behind N-Queens, Sudoku, and maze solving.
When recursion repeats work, memoization and tabulation turn exponential into polynomial.
The canonical DP table: for each item and capacity, take it or leave it to maximize value.
A bottom-up DP over amounts that also generalizes to counting the number of ways.
When taking the best choice at each step provably gives the best overall answer. Covers activity selection, job sequencing and fractional knapsack.
Repeatedly merge the two least-frequent symbols to build a minimum-cost prefix code.
Near-constant-time union and find with path compression and union by rank, the backbone of connectivity checks and cycle detection.
Store strings character by character for O(length) insert and search, plus autocomplete and longest-common-prefix.
Slide a window across an array to answer subarray questions in O(n) instead of O(n²).
Treat a 2D grid as an implicit graph: explore neighbors with BFS for shortest paths and DFS for flood fill.
Understand how an OS manages processes, threads, memory, and CPU scheduling. Covers virtual memory, deadlocks, and file systems.
Learn what a process really is, how the OS tracks it in a PCB, how it moves between states, and how threads differ from processes.
See what sits between your apps and your phone's hardware: how an OS shares the CPU, keeps memory private and guards the camera, and what the kernel is.
What a running app really is to the OS: a program versus a process, the PCB card the OS keeps for each one, and the five states every process moves through.
How one CPU runs dozens of apps at once: time slices, the timer interrupt that takes the CPU back, and the context switch that swaps one process for the next.
Why one app runs several threads: what threads share and keep to themselves, how a thread differs from a process, and how two threads can lose an update.
How every new process is made: fork copies the running one, exec swaps in a new program, and what happens to zombie and orphan processes.
Walk through every major scheduling algorithm with Gantt chart examples. Understand how the OS decides which process runs next.
Understand how every process gets its own address space, how the MMU translates addresses, and how page replacement algorithms handle full RAM.
From race conditions to deadlock prevention. Learn the tools threads use to take turns: mutexes, semaphores, condition variables.
What a deadlock is, the four Coffman conditions, and the three ways an OS handles it: prevention, avoidance with the banker's algorithm, and detection.
How a flat sequence of disk blocks becomes a hierarchy of named files. Learn inodes, hard links, block pointers, and how journaling prevents corruption.
Understand how processes request OS services via system calls. Covers the syscall interface, context switches, common calls, and how to trace them.
Learn how separate processes exchange data: anonymous pipes, named pipes, message queues, shared memory, and Unix domain sockets.
How the OS abstracts hardware I/O: device drivers, interrupt handling, DMA, kernel buffers, and disk scheduling algorithms.
From bare-metal to Type-1/Type-2 hypervisors, hardware-assisted virtualisation, and how containers differ from VMs.
Learn the relational model, write real SQL queries, understand ACID transactions, normalization, and how indexes make queries fast.
Your first complete SQL guide. Learn to define tables, insert data, filter with WHERE, sort, paginate, and aggregate, all with real examples.
Why apps don't keep their data in plain files: what a database and a DBMS are, how tables hold rows and columns, and schema versus instance.
Ask a database questions in SQL: pick columns with SELECT, filter rows with WHERE, sort, count and change data, and tell DELETE, TRUNCATE and DROP apart.
How a database tells rows apart and refuses bad data: candidate, super, primary, composite and foreign keys, and NOT NULL, UNIQUE and CHECK.
Combine two tables into one answer: what each SQL join keeps, how many rows it returns, and when to reach for a cross join or a self join.
Learn INNER, LEFT, RIGHT, and FULL JOINs with visual diagrams, then move on to CTEs, subqueries, and window functions.
Model your domain before writing SQL: ER diagrams, one-to-many and many-to-many relationships, naming, and when to denormalise for speed.
Fix one college registration sheet step by step and see exactly what each normal form removes, from multi-valued cells to BCNF.
ACID guarantees, isolation levels, MVCC, and deadlocks in detail. Know exactly what your database does when things go wrong.
How B-Tree indexes work internally, composite vs covering indexes, EXPLAIN output, and the rules for knowing when to add an index, or remove one.
Follow a SQL query from text to result: parsing, logical/physical planning, cost estimation, join algorithms, and reading EXPLAIN output.
Understand when to choose NoSQL over relational. Covers MongoDB, Redis, Cassandra, and Neo4j with CAP theorem and consistency trade-offs.
Move logic into the database with stored procedures and triggers. Learn when they help, when they hurt, and how views simplify complex queries.
How databases stay available and consistent across multiple nodes. Covers replication lag, failover, read replicas, and Raft consensus.
From physical cables to HTTP requests. Learn the OSI and TCP/IP models, how DNS resolves names, TCP vs UDP, and how the web actually works.
Understand IPv4 binary structure, subnet masks, CIDR notation, private vs public ranges, NAT, and how IPv6 solves address exhaustion.
Follow one message from your phone to a friend's: why it's cut into packets, the three sizes of network, and the shapes devices are wired in.
How every device on a network gets a number: how an IPv4 address is written, public versus private addresses, NAT, IPv6 and localhost.
How a packet finds its way: a switch delivers inside one network by MAC address, a router forwards between networks hop by hop, and a hub just shouts.
What happens when you type a site's name: your device's cache, the resolver, the root, TLD and authoritative servers, and how long an answer is cached.
How a message is packed layer by layer before it leaves your phone: the seven OSI layers, what each wrapper is called, and the TCP/IP model.
Go beyond "TCP is reliable." Learn sequence numbers, ACKs, retransmission, flow control, slow start, and the four-way connection teardown.
Connection, reliability, order, speed and header size side by side, and which real apps use each protocol and why.
Trace a DNS query from browser to authoritative nameserver. Learn all record types, TTL trade-offs, DNSSEC, DoH, and how to debug DNS issues.
A complete guide to HTTP: request/response structure, all methods, status codes, important headers, cookies, HTTP/2, HTTP/3, and the TLS handshake.
Beyond HTTP: how email, file transfer, remote login, and real-time bi-directional communication protocols work at the application layer.
How routers share topology information and choose paths. Covers distance-vector vs link-state, OSPF internals, and BGP as the glue of the internet.
From symmetric vs asymmetric crypto to MITM, DDoS, SYN floods, DNS spoofing, and SSL stripping. Learn the attacks and how to stop them.
A practical toolkit for diagnosing network problems: reading ICMP output, tracing hops, capturing packets, and interpreting TCP flags in the wild.