Foundations

Algorithms & Data Structures

Sorting, searching, graphs, trees, dynamic programming and computational complexity

4,003
lessons
Skills in this topic
View full skill map →
Algorithm Basics
beginner
Analyse time and space complexity with Big O
Sorting & Searching
beginner
Implement quicksort, mergesort, and heapsort
Hashing & Hash Functions
beginner
Explain the four properties of secure hash functions
Graph Algorithms
intermediate
Implement BFS and DFS iteratively and recursively
Dynamic Programming
intermediate
Identify overlapping subproblems
Advanced Algorithms
advanced
Implement backtracking for constraint problems
All Reads (692) Articles (77)Blog Posts (543)Tutorials (68)Research Papers (2)News (2)
Selection Sort Explained With a Bookshelf Story (With Code)
Dev.to · Krunal Kanojiya ⚡ Algorithms & Data Structures ⚡ AI Lesson 5d ago
Selection Sort Explained With a Bookshelf Story (With Code)
Two years ago I tried to arrange my bookshelf by height, shortest on the left. I had no plan. I just...
LeetCode Journal # 1
Dev.to · Fatima Qaisar ⚡ Algorithms & Data Structures ⚡ AI Lesson 5d ago
LeetCode Journal # 1
Documenting my daily LeetCode journey here! Today's Problem: 1512. Number of...
O(N) Manacher's Algorithm with Mirror Boundary Optimization
Dev.to · Dipaditya Das ⚡ Algorithms & Data Structures ⚡ AI Lesson 2w ago
O(N) Manacher's Algorithm with Mirror Boundary Optimization
Intuition Manacher's Algorithm leverages the symmetry of palindromes to avoid redundant...
Building a Power Grid Inside Minecraft with BFS Algorithms
Dev.to · Carlos Cortez 🇵🇪 [AWS Hero] ⚡ Algorithms & Data Structures ⚡ AI Lesson 2w ago
Building a Power Grid Inside Minecraft with BFS Algorithms
Every cloud service needs power. AWS has data centers, Azure has regions, GCP has zones — and they're...
The Binary Search Strikes Back: A Jedi's Guide to Finding Things Fast
Dev.to · Timevolt ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
The Binary Search Strikes Back: A Jedi's Guide to Finding Things Fast
The Quest Begins (The "Why") Honestly, I used to dread interview questions that started...
The Three Algorithm Families Behind Almost Every Generated Game World
Dev.to · Paul Crinigan ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
The Three Algorithm Families Behind Almost Every Generated Game World
Minecraft terrain, roguelike dungeons, and No Man's Sky planets all come from the same place: rules,...
Binary Search: The One Ring to Rule Them All
Dev.to · Timevolt ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
Binary Search: The One Ring to Rule Them All
The Quest Begins (The "Why") I still remember the first time I faced a sorted array in an...
Morris Pre Order Traversal
Dev.to · Jaspreet singh ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
Morris Pre Order Traversal
Problem Statement Given the root of a binary tree, return its preorder traversal. The...
The Minecraft anvil is a tree-cost optimization problem in disguise
Dev.to · Mark ⚡ Algorithms & Data Structures ⚡ AI Lesson 4w ago
The Minecraft anvil is a tree-cost optimization problem in disguise
I fell down this rabbit hole because of a small, annoying moment in a survival game. I had a diamond...
KMP Algorithm (Knuth-Morris-Pratt): The Smart Way to Perform String Matching in O(N)
Dev.to · Jaspreet singh ⚡ Algorithms & Data Structures ⚡ AI Lesson 4w ago
KMP Algorithm (Knuth-Morris-Pratt): The Smart Way to Perform String Matching in O(N)
Searching for a pattern inside a string is one of the oldest and most common problems in Computer...
Every Backtracking Problem Is the Same Three Lines. I Just Couldn't See the Tree.
Dev.to · Alex Mateo ⚡ Algorithms & Data Structures ⚡ AI Lesson 4w ago
Every Backtracking Problem Is the Same Three Lines. I Just Couldn't See the Tree.
I avoided backtracking for an embarrassingly long time. I had solved maybe 200 problems and could do...
Thinking in algorithms - A Different Way to Think About the Task Scheduler Problem
Dev.to · Kushagra Mehrotra ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Thinking in algorithms - A Different Way to Think About the Task Scheduler Problem
I recently came across the classic CPU Task Scheduler problem on HackerRank. You are given an...
The Bitwise Jedi: Mastering the XOR Trick Like a Lightsaber
Dev.to · Timevolt ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
The Bitwise Jedi: Mastering the XOR Trick Like a Lightsaber
The Quest Begins (The "Why") I still remember the first time I faced a coding interview...
Bloom Filters, Explained Properly
Dev.to · Daksh Gargas ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Bloom Filters, Explained Properly
How it actually works!
Data structures interview questions: what each one predicts on the job
Dev.to · Frank @ Four-Leaf ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Data structures interview questions: what each one predicts on the job
What each data structure in a coding interview screens for, the on-the-job behavior it predicts, and the signal your first sentences send.
Time vs. Space Complexity: Kenapa Ini Penting Banget Buat Aplikasi Lo (Bukan Cuma Buat Ujian!)
Dev.to · Ogak Dev ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Time vs. Space Complexity: Kenapa Ini Penting Banget Buat Aplikasi Lo (Bukan Cuma Buat Ujian!)
Halo para developer kece! 👋 Pernah nggak sih lo ngerasa aplikasi yang udah susah payah lo bikin kok...
Week 7: My First Agorithms.
Dev.to · Om Kolhapure ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Week 7: My First Agorithms.
For six weeks I built things. Week 7 I solved problems. It's a different muscle. Building an app is...
Implementing Huffman Coding in Go — Merging the Two Rarest Nodes Builds the Optimal Prefix-Free Code
Dev.to · SEN LLC ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Implementing Huffman Coding in Go — Merging the Two Rarest Nodes Builds the Optimal Prefix-Free Code
A CLI that compresses text with Huffman coding and reports the ratio, in Go. The essence of Huffman...
The Priority Queue: My Jedi Training with Heaps
Dev.to · Timevolt ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
The Priority Queue: My Jedi Training with Heaps
The Quest Begins (The "Why") Honestly, I used to dread interview questions that asked for...
Position Calculations in Two-Dimensional Arrays
Dev.to · Lori-Shu ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Position Calculations in Two-Dimensional Arrays
I keep falling into the same trap: coordinate calculations. I'm here to record some of the lessons...
Binary Search is NOT About Searching
Dev.to · Sadanand Dodawadakar ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Binary Search is NOT About Searching
Every one of us learned binary search the same way. We have a sorted array. Want to find a specific...
Coin Change | Dynamic Programming
Dev.to · Jaspreet singh ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Coin Change | Dynamic Programming
Problem Statement leetcode.com ...
Fractional Knapsack
Dev.to · Jaspreet singh ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Fractional Knapsack
Problem Statement Given items with value and weight, maximize total value inside a...
The 7 Trigger Questions That Tell You Which Coding Pattern to Use
Dev.to · Alex Mateo ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
The 7 Trigger Questions That Tell You Which Coding Pattern to Use
Most developers preparing for coding interviews learn the patterns. Sliding window. Two pointers....
Stop Writing O(n ) Loops — Master the Two Pointers Pattern
Dev.to · Abivarsan R ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Stop Writing O(n ) Loops — Master the Two Pointers Pattern
A hands-on guide to one of the most powerful algorithmic patterns you'll use every week — with real...
The 100 Prisoners Problem: Permutation Cycles and the 31% Miracle
Dev.to · White Oak Intelligence ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
The 100 Prisoners Problem: Permutation Cycles and the 31% Miracle
In This Article The Question The Intuition Trap: Why Independent Strategies Fail The Loop Strategy:...
LeetCode Solution: 3. Longest Substring Without Repeating Characters
Dev.to · Blogger Hommie ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
LeetCode Solution: 3. Longest Substring Without Repeating Characters
3. Longest Substring Without Repeating Characters 🟡 Medium Hey Dev.to fam! 👋 Today, we're...
LeetCode Solution: 2. Add Two Numbers
Dev.to · Hommies ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
LeetCode Solution: 2. Add Two Numbers
Add Two Numbers 🟡 Medium: Summing Up Linked Lists Like a Pro! Hey there, aspiring algorithm...
N-Queens: What Clicked After I Stopped Brute-Forcing It
Dev.to · Puzu ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
N-Queens: What Clicked After I Stopped Brute-Forcing It
N-Queens is a classic backtracking problem. The goal is simple: place N queens on an N×N chessboard...
The Blind 75 Problem List Is Outdated in 2026. Here Is What to Practice Instead.
Dev.to · Skill Flow ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
The Blind 75 Problem List Is Outdated in 2026. Here Is What to Practice Instead.
TL;DR: The Blind 75 was a revolutionary resource when it was published, and it still has value today....
Frequency Map Pattern — LeetCode #242: Valid Anagram
Dev.to · Yash Gandhi ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Frequency Map Pattern — LeetCode #242: Valid Anagram
The first time a hash map stores more than existence — and the universal trick of tracking differences instead of comparing two separate things
Encoding FIFA’s 495 third-place scenarios for the 2026 World Cup
Dev.to · Mark ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Encoding FIFA’s 495 third-place scenarios for the 2026 World Cup
I expected the 2026 World Cup bracket to be a sorting problem. It turned out to be a sorting problem...
Binary Search Tree Explained: All Operations From One Rule
Dev.to · Prakhar Srivastava ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Binary Search Tree Explained: All Operations From One Rule
Most BST tutorials teach search, insert, and delete as three procedures. You memorise one, then the...
Three problems I had to solve to teach algorithms in a browser
Dev.to · Yathiskumar ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Three problems I had to solve to teach algorithms in a browser
A few months ago, I noticed I was rereading the same ByteByteGo article on rate limiting for the...
Quick Sort — Why Your Programming Language Uses This Algorithm for .sort()
Dev.to · Amar Gul ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Quick Sort — Why Your Programming Language Uses This Algorithm for .sort()
Every time you call .sort() in JavaScript, Python, or Java — Quick Sort is running under the...
Interview Sheet Q2:- 121. Best Time to Buy and Sell Stock
Dev.to · shipra Shankhwar ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Interview Sheet Q2:- 121. Best Time to Buy and Sell Stock
Approach 1: Brute Force Try every possible buy day. For each buy day, try every sell day...
Backtracking Algorithm Explained: An N-Queens Walkthrough
Dev.to · Prakhar Srivastava ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Backtracking Algorithm Explained: An N-Queens Walkthrough
The textbook line on backtracking is "try everything and undo what doesn't work." Accurate, and...
AVL Trees Explained: How Rotations Keep BST Operations O(log n)
Dev.to · Prakhar Srivastava ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
AVL Trees Explained: How Rotations Keep BST Operations O(log n)
You learn binary search trees and walk away believing every operation is O(log n). It isn't. That...
Sliding Window on Strings Explained Simply in Java
Dev.to · Quipoin ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Sliding Window on Strings Explained Simply in Java
Many string problems look complicated because they involve: substrings repeated characters dynamic...
Bubble Sort Explained Simply — Algorithm, Code & Complexity
Dev.to · Ankit Maheshwari ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Bubble Sort Explained Simply — Algorithm, Code & Complexity
Bubble Sort isn't used in production — but it's the best algorithm to learn sorting logic because...
Anagram & Palindrome Problems Explained Simply in Java
Dev.to · Quipoin ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Anagram & Palindrome Problems Explained Simply in Java
String interview questions often look tricky… But many of them are built on: character...
Two Sum — LeetCode #1 (Easy)
Dev.to · Shubham Gupta ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Two Sum — LeetCode #1 (Easy)
Given an array of integers and a target, return the indices of two numbers that add up to the target.
LeetCode Solution: 5. Longest Palindromic Substring
Dev.to · Hommies ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
LeetCode Solution: 5. Longest Palindromic Substring
Longest Palindromic Substring: A Core String Algorithm Explained Welcome to another deep...
LeetCode Solution: 4. Median of Two Sorted Arrays
Dev.to · Hommies ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
LeetCode Solution: 4. Median of Two Sorted Arrays
Unlock the Median Magic: Diving into Two Sorted Arrays! Hey LeetCoders and aspiring...
Sliding Window & Two Pointers: The Decision Framework Nobody Teaches You
Dev.to · Alex Mateo ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Sliding Window & Two Pointers: The Decision Framework Nobody Teaches You
Most people learn sliding window and two pointers as two separate techniques, practice them in...
Arrays vs Linked Lists: Why Big-O Alone Doesn't Explain the Tradeoff
Dev.to · Prakhar Srivastava ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Arrays vs Linked Lists: Why Big-O Alone Doesn't Explain the Tradeoff
The complexity table for arrays and linked lists is the most memorised, least understood reference in...
Heap Data Structure
Dev.to · João Godinho ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Heap Data Structure
Introduction This post covers binary heaps as a complete binary tree stored in an array,...
Integer Sorting Via Value Space Partitioning
Dev.to · Haris Abdullah ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Integer Sorting Via Value Space Partitioning
The Dutch National Flag Algorithm Dijkstra's Dutch National Flag algorithm sorts an array...