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)
The Rain Knows the Shortest Path
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1w ago
The Rain Knows the Shortest Path
Every raindrop on a pond is running the same algorithm you’ve been afraid of. Watch one fall. Continue reading on Medium »
Data Structures & Algorithms for Mobile App Developers
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1w ago
Data Structures & Algorithms for Mobile App Developers
As a Mobile Tech Lead, I’ve often noticed that most Data Structures & Algorithms (DSA) resources are written for general software… Continue reading on Medium »
Data Structures and Algorithms Deep‑Dive — Real-world Applications of Hash Tables (Chapter 3…
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1w ago
Data Structures and Algorithms Deep‑Dive — Real-world Applications of Hash Tables (Chapter 3…
Chapter 3 — Hash Tables and Hashing Continue reading on Medium »
Day 29/100 Koko Eating Bananas  (Binary Search)
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1w ago
Day 29/100 Koko Eating Bananas (Binary Search)
Koko loves bananas, and there are several piles of them. She can decide her eating speed (k bananas/hour) and wants to finish all the… Continue reading on Mediu
The Run-Length Encoding Trick: How Simple Strings Get Compressed
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2w ago
The Run-Length Encoding Trick: How Simple Strings Get Compressed
Have you ever wondered how your computer shrinks massive files down so they don’t absolutely wreck your hard drive? Continue reading on Medium »
75 Days of Leetcode — Day 4: #238 — Product of Array Except Self
Medium · AI ⚡ Algorithms & Data Structures ⚡ AI Lesson 2w ago
75 Days of Leetcode — Day 4: #238 — Product of Array Except Self
Day 4 is here. Product of Array Except Self is on the chopping block: Continue reading on Medium »
I implemented the algorithm that broke the sorting barrier. Dijkstra still wins.
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2w ago
I implemented the algorithm that broke the sorting barrier. Dijkstra still wins.
In 2025 a paper proved you can compute shortest paths asymptotically faster than Dijkstra. I built a verified implementation on a 2012… Continue reading on Medi
Practice Algorithms and DS the Structured Way
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
Practice Algorithms and DS the Structured Way
Most algorithm practice is a pile of random problems. You get reps, but you never build a mental map of the techniques. So I built… Continue reading on AnotherA
Sieve of Eratosthenes Algorithm
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
Sieve of Eratosthenes Algorithm
Finding the prime numbers between the 2 to n as given input(n) value. We know the usual solution for finding an number is prime or not in… Continue reading on M
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
Rising junior CS/CompE student — 2 months to rebuild my DSA foundation before internship season. What's your actual game plan?
Hey everyone, I'm heading into my third year of computer engineering, and I'll be honest DSA has been the hardest part of my degree so far. I can follow along i
Advanced Stack ApplicationsData Structures and Algorithms Deep‑Dive — Advanced Stack Applications…
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 3w ago
Advanced Stack ApplicationsData Structures and Algorithms Deep‑Dive — Advanced Stack Applications…
Chapter 2 — Basic Data Structures Continue reading on Medium »
DSA From Zero to Hero #3: Sliding Window (Fixed Size) Explained With a Java Example
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 4w ago
DSA From Zero to Hero #3: Sliding Window (Fixed Size) Explained With a Java Example
I used to solve every “subarray of size k” question with two nested loops. It worked. It also would have gotten me rejected in any real… Continue reading on ILL
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 4w ago
Two Pointers & Sliding Window: Turn O(n²) Into O(n)
Part 3 of the “Algorithms You Actually Use” series. A whole class of “check every pair / every subarray” problems looks like it needs… Continue reading on Mediu
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Hash Maps: The Data Structure You’ll Use Most
Part 1 of the “Algorithms You Actually Use” series. If you learn exactly one data structure deeply, make it this one. It turns slow code… Continue reading on Me
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
where to learn bcktracking from?
I want to learn backtracking in Python, but I'm finding it really hard to understand the thought process behind it. I tried watching Aditya Verma's backtracking
Pseudocode: Cara Terbaik Merancang Algoritma Sebelum Menulis Kode Sungguhan
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Pseudocode: Cara Terbaik Merancang Algoritma Sebelum Menulis Kode Sungguhan
Di artikel sebelumnya kita sudah memahami apa itu algoritma dan bagaimana cara menyusunnya. Kali ini kita akan membahas cara menuliskan… Continue reading on Med
Google Onsite Interview Question #1: Distance to the Nearest 1 in a Binary Matrix
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Google Onsite Interview Question #1: Distance to the Nearest 1 in a Binary Matrix
Not a Medium member? Use the free link below. Continue reading on Medium »
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Algo Ameba :- An Open Source DSA visualization platform to help you learn and visualise in better way with smooth animations ,play,pause and speed controller to adjust at you own pace
Web:- https://algo-ameba.vercel.app/ I made this to understand algorithm to watch them play but also adjust at your own animations . I have used D3.js and GSAP
15 DSA Patterns That Cover 80% of Medium-Level Coding Interviews
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
15 DSA Patterns That Cover 80% of Medium-Level Coding Interviews
Stop solving random problems. Start recognizing patterns instead. Continue reading on Data Science Collective »
Prefix Sums: The Preprocessing Trick That Makes Range Queries Instant
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Prefix Sums: The Preprocessing Trick That Makes Range Queries Instant
If you’ve ever looped through an array to calculate a sum, only to do it again for a slightly different range - this is for you. Continue reading on Medium »
I Thought I Was Ready for the Interview — Then One Simple Math Question Destroyed Me
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
I Thought I Was Ready for the Interview — Then One Simple Math Question Destroyed Me
Most Developers Study Algorithms for Months. The Interview Question That Rejects Them Takes Only 10 Seconds. Continue reading on Javarevisited »
16. NeetCode 150 — Longest Substring Without Repeating Characters
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
16. NeetCode 150 — Longest Substring Without Repeating Characters
Difficulty: Medium | Pattern: Sliding Window Continue reading on Medium »
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
The Graph Traversal Recipe That Simplified Every Graph Problem I Solved
By Sai Pranav Moluguri Continue reading on Medium »
Week 16 — Finished the DP Homework I Gave Myself
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Week 16 — Finished the DP Homework I Gave Myself
Last week I ended the blog by giving you three problems to try. House Robber, Min Cost Climbing Stairs and Tribonacci. Continue reading on Medium »
Sliding Window: Stop Recalculating What You Already Know
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Sliding Window: Stop Recalculating What You Already Know
If you’ve written a nested loop to check every subarray and wondered “there must be a better way” - there is. This is for you. Continue reading on Medium »
Two Pointers: The Pattern That Turns O(n²) into O(n) Magic
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Two Pointers: The Pattern That Turns O(n²) into O(n) Magic
If you’ve ever stared at an array problem and instinctively written two nested loops - this is for you. Continue reading on Medium »
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
The 10 Array Patterns That Power Most LeetCode Questions.
“I have solved hundreds of array problems, but every new problem still looks different.” Continue reading on Medium »
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Prep for the interview
Hi! I'm currently preparing for the interview to one of the big IT corporations. I was asked to prepare from data structures and algorithms. I'm a full time dev
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
How I Solved the Second Largest Problem on CodeChef
When I first looked at the “Second Largest” problem on CodeChef, it seemed straightforward. My initial thought was to sort the array and… Continue reading on Me
Sorting: More Than Just Arranging Numbers
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Sorting: More Than Just Arranging Numbers
Have you ever learned something for months and then suddenly realised that you never truly understood it? Continue reading on Medium »
Search Insert Position: The Solution Was Simple Once the Pattern Clicked
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Search Insert Position: The Solution Was Simple Once the Pattern Clicked
Some DSA problems look difficult when reading the problem statement. Continue reading on Medium »
Meta Hacker Cup 2022 — Qualification Round: Second Hands
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Meta Hacker Cup 2022 — Qualification Round: Second Hands
Difficulty: Easy-Medium Topic: Greedy Algorithm, Constraint Satisfaction Original Problem… Continue reading on Javascript by doing »
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
How do you guys know what is the best method at the time?
Every time I need an algorithm while or for loops are first that came into my mind. However, I always hesitate when I use them. How can I be sure the fastest me
Alternative O(n²) Word Break Solution (Without DP / DFS / BFS / Trie)
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Alternative O(n²) Word Break Solution (Without DP / DFS / BFS / Trie)
When tackling LeetCode 139 — Word Break, most engineers instinctively reach for Dynamic Programming, DFS + Memoization, or even Trie-based… Continue reading on
Day 120 of Learning Java & DSA: Heap Sort vs Merge Sort vs Quick Sort
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Day 120 of Learning Java & DSA: Heap Sort vs Merge Sort vs Quick Sort
After spending the last few weeks learning Merge Sort, Quick Sort, and Heap Sort individually, today I decided to compare all three… Continue reading on Medium
Master LeetCode 118: Pascal’s Triangle (The Ultimate JavaScript Guide for All Coding Levels)
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Master LeetCode 118: Pascal’s Triangle (The Ultimate JavaScript Guide for All Coding Levels)
Discovering the hidden beauty of algorithms doesn’t require a math degree. Today, we are breaking down one of LeetCode’s most popular… Continue reading on Mediu
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
So a Binary Search Tree is actually useful?
I've solved some problems before on Leetcode and studied some algorithms and data structures, but recently I decided to study them more seriously. I took an alg
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
The Day I Realized I Didn’t Really Understand O(log n)
As software developers, we spend a lot of time learning data structures and algorithms. We memorize complexities, solve coding problems… Continue reading on Med
Day 116 of Learning Java & DSA: Introduction to Heap Data Structure
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Day 116 of Learning Java & DSA: Introduction to Heap Data Structure
After learning the basics of Heap Sort, today I decided to explore the foundation behind it: Continue reading on Medium »
Every Developer Must Know These 7 Algorithms — Here’s How They Work in Dart
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 1mo ago
Every Developer Must Know These 7 Algorithms — Here’s How They Work in Dart
Your code works. But does it work fast enough? The difference between a junior and a senior developer often comes down to one thing… Continue reading on Medium
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Segment Tree Python CheatSheet
Here’s a complete segment tree cheatsheet covering the key patterns you’ll reach for in practice: Continue reading on Medium »
En Verimli Yolu Arayan Yazılımcılar İçin Rehber: Dijkstra, Bellman-Ford ve Floyd-Warshall…
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
En Verimli Yolu Arayan Yazılımcılar İçin Rehber: Dijkstra, Bellman-Ford ve Floyd-Warshall…
Günlük hayatımızda farkında olmasak da her an bir yerlere en kısa yoldan ulaşmaya çalışıyoruz. Sabah işe giderken Google Maps’in bize… Continue reading on Mediu
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Just watched the best explanation of shortest path algorithms I've ever seen
I’ve gone down many rabbit holes trying to wrap my head around graph theory, but this Veritasium video is the first time everything truly clicked for me. It isn
Understanding P, NP, NP-Complete, and NP-Hard: A Beginner's Guide to Computational Complexity
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Understanding P, NP, NP-Complete, and NP-Hard: A Beginner's Guide to Computational Complexity
Learn the difference between P, NP, NP-Complete, and NP-Hard with simple explanations, examples, and diagrams. Continue reading on Medium »
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Practicing algorithms with scratch (https://scratch.mit.edu/)
Is scratch the best way to practice algorithms? I was a CS student before and I really suck at algos. or do I need to learn discrete math to figure it out? Any
Mo’s Algorithm for Range Queries in Java
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Mo’s Algorithm for Range Queries in Java
Range query problems can get expensive when every request scans its own slice of the array from scratch. Mo’s Algorithm handles that by… Continue reading on Med
Reddit r/learnprogramming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Rebuilding programming fundamentals and preparing for junior interviews
Hi everyone, I’m a Computer Science graduate rebuilding my programming fundamentals and preparing for junior software interviews. My current focus is problem so
Pattern 3: Binary Search
Medium · Programming ⚡ Algorithms & Data Structures ⚡ AI Lesson 2mo ago
Pattern 3: Binary Search
Hi guys, welcome back to my DSA series. I Hope you are following my journey. If not, check out my previous posts as well. Today, let’s… Continue reading on Towa