Algorithms Curated
This is a curated list of various algorithms and coding interview resources.
General
Blogs & Resources
- Coding interview script
- LeetCode Interview Questions
- Ruslan Writes Code
- Algorithms and Problem Solving
- Dimka Maleev
- Omar Faroque
- Daniel Leskosky
- Try Khov
- Coding Recipies
- Vaidehi Joshi
- Abhijit Mondal
Lectures & Teaching Material
- The Algorithm Design Manual by Steven Skiena
- Skiena’s Algorithms Lectures
- Algorithms - Carnegie Mellon University 15-451/651
- Uri Zwick - Tel Aviv University
- Approximation Algorithms - Chandra Chekuri
- Algorithms and Data Structures - McGill University COMP 251
- Parallel and Sequential Data Structures and Algorithms - Carnegie Mellon University 15-210
Since summer of 2013, the course is taught from the book Algorithm Design: Parallel and Sequential.
- Design and Analysis of Computer Algorithms - University of Maryland CMSC 451
- Introduction to Algorithms - MIT 6.006
- Design and Analysis of Algorithms - MIT 6.046J
- Introduction to Algorithms - MIT 6.046J
- Advanced Algorithms - MIT 6.854J
- Randomized Algorithms - MIT 6.856J
- Distributed Algorithms - MIT 6.852J
- Advanced Data Structures - MIT 6.851
- Discrete Mathematics in Computer Science - Dartmouth College
- Introduction to Programming Contests - Stanford CS 97SI
- Algorithms and Complexity - KTH DD2354
- Term Websites - MIT 6.046
Quizzes and homeworks are not available publicly after 2008 Fall.
- York College - CS 360
- Homeworks and Handouts - University of Maryland CMSC 451
- Quiz 2 - MIT 6.006 Fall 07
- Quiz 2 - MIT 6.006 Spring 08
- All Exercises and Solutions - Ecole Polytechnique
- Practice Problems Solutions - Dalhousie University CSCI 3110
- Assignment 3 Solutions - Dalhousie University CSCI 3110
- Assignment 4 Solutions - Dalhousie University CSCI 3110
- Assignment 5 Solutions - Dalhousie University CSCI 3110
- Spanning Trees Exercises Solutions - Ecole Polytechnique
YouTube
- Coding Interview Q&A - CS Dojo
- Algorithms Conquered
- Stable Sort
- Algorithms Live!
- Cracking the Coding Interview - HackerRank
- Tim Roughgarden Lectures
- ByteByteGo
Solutions by Coding Platforms
- Programming Puzzles
- cheonhyangzhang/leetcode-solutions
- tenderleo/leetcode-solutions
- walkccc/LeetCode
- Abhisarkar/Leetcode
- Seanforfun/Algorithm-and-Leetcode
- tonycao/Leetcode-Unlocked
- Yu’s Coding Garden
- massivealgorithms
- protegejj/Algorithm Practice
- Buttercola
- AlexLin
- LeetFree
- kvaluruk/Data-Structures-And-Algorithms-Hacktoberfest18
- ngalayko/dcp
- nowol79/Daily_Coding_Problem
- marcelodebarros/dailycodingproblem
- r1cc4rdo/daily_coding_problem
- Jedshady/daily-coding-problem
- vineetjohn/daily-coding-problem
- Li-Victor/Daily-Coding-Problem
- matthewsamuel95/ACM-ICPC-Algorithms
Solutions by Topics
- CLRS Solutions
- Abhisarkar/DataStructure_Algorithms_Library
- allenlipeng47/algorithm
- raywenderlich/swift-algorithm-club
- micheleorsi/exercises
- mrrusof/algorithms
- AlgoTree
- Algorithms - Jeff Erickson
- Problem Solving with Algorithms and Data Structures
- OpenDSA Data Structures and Algorithms
- pathikrit/scalgos
- skseth/algorithms
- vkostyukov/scalacaster
- phishman3579/java-algorithms-implementation
- OpenDSA Data Structures and Algorithms
- jpa99/Algorithms
- phishman3579/java-algorithms-implementation
- psjava/psjava
- jeandersonbc/algorithms-and-ds
- pedrovgs/Algorithms
- Erdos-Graph-Framework/Erdos
- deepak-malik/Data-Structures-In-Java
- yusufcakal/algorithms
- tryalgo
- knaidu/problem-solving
Practice
- LeetCode
- HackerRank
- Codeforces
- HackerEarth
- CodeSignal
- Firecode
- Codewars
- Coderbyte
- SPOJ
- CodeChef
- Codemonk
- BRILLIANT
- Developer Roadmaps
- Tech Dev Guide
- CodesDope
- Rosalind
- Programming Practice Problems
Other Curated Lists
- Data Structures and Algorithms
- All of the good tutorials found on codeforces
- Good Blog Post Resources about Algorithm and Data Structures
- Awesome Competitive Programming
- Awesome Algorithms
- Algorithm Courses
- prakhar1989/awesome-courses
- Learn Data Structures and Algorithms - CodeChef
- 500+ Data Structures and Algorithms practice problems
Asymptotic Analysis
- A Gentle Introduction to Algorithm Complexity Analysis
- Master Theorem
- Worst-Case Analysis of Set Union Algorithms - Tarjan
- Assignment 1 Solutions - Dalhousie University CSCI 3110
- Assignment 2 Solutions - Dalhousie University CSCI 3110
Bits
- Two’s Complement
- The simple math behind decimal-binary conversion algorithms
- Introduction to Low Level Bit Hacks
Math & Numerics
- Hamming’s Problem
- The Role of Smooth Numbers in Number Theoretic Applications
- Square Roots, Newton’s Method - MIT 6.006 2011
- Approximating Square Roots with Newton’s Method
- Finding Square Roots Using Newton’s Method
- Markov Chains - University of Auckland
- Topics in PRECALCULUS
- The Genuine Sieve of Eratosthenes
- Probabilistic Analysis - York College
Arrays
- Algorithms for Minesweeper Game Grid Generation
- Fun with array rotations
- Longest Increasing Subsequence
- Sparse Data Structures in Python
Sorting & Searching
- Counting Sort
- Radix Sort
- External Merge-Sort
- External Sorting - Xu
- External Sorting - OpenDSA
- External Sorting - Yahoo
- K-way-Merge-Algorithms
- K-way Merging and K-ary Sorts
- A Comparative Study of Linked List Sorting Algorithms
- Selection (deterministic & randomized)
- Powerful Ultimate Binary Search Template. Solved many problems
- Finding Second Largest Element in an Array - University of Maryland
- Kth Smallest Element
- Assignment 7 Solutions - Dalhousie University CSCI 3110
Combinatorial
- Permutation Generation Methods
- Efficiently Enumerating the Subsets of a Set
- Ranking and Unranking Permutations in Linear Time
- Efficient Algorithms to Rank and Unrank Permutations in Lexicographic Order
- Steinhaus-Johnson-Trotter algorithm
- Interview Question: Subarray Sums - Stanford
- Interview Question: Two Sum - Stanford
- Reservoir Sampling
- Finding Squares and Rectangles in Sets of Points
- Solving Nonograms
- How to solve Nonogram Puzzles
Divide-and-Conquer
- Solving Divide-and-Conquer Recurrences - Adamchik
- Finding the Closest Pair of Points on the Plane
- Assignment 6 Solutions - Dalhousie University CSCI 3110
Linked Lists
Hashing
- Bloom Filters by Example
- Bloom Filters
- Merkle Trees: What They Are and the Problems They Solve
- Comparing Git Trees in Go
- Using Merkle Trees to Detect Inconsistencies in Data
- Probability Calculations in Hashing
- Hashing - Bebis
- Universal Hashing- Minimizing Collisions
- Universal Classes of Hash Functions - Carter+Wegman
Strings
- String-matching algorithms
- (KMP) Pattern Matching Substring Search
- KMP String Matching Algorithm
- Prefix Hash Tree
- Trie, Suffix Tree, Suffix Array - MIT 6.851
- Suffix Arrays: A New Method for On-Line String Searches
- Suffix arrays - a programming contest approach
- Simple Linear Work Suffix Array Construction
- Two Efficient Algorithms for Linear Time Suffix Array Construction
- Space efficient linear time construction of suffix arrays
- Tries and Suffix Tries
- Suffix Indexing
- Ukkonen’s Algorithm
- Suffix Tree using Ukkonen’s algorithm
- Ukkonen’s Suffix Tree Algorithm
- Algorithm to find the Least Lexicographic Rotation of a Circular String
- Tutorial on Trie and Example Problems
- Interview Question: Anagram Detection - Stanford
- Aho-Corasick Automata - Stanford
- Aho-Corasick Algorithm
- Construction of Aho Corasick Automaton in Linear Time
- Efficient String Matching
- Lexicographically Minimal String Rotation
- Rolling hash and 8 interesting problems
- Z Algorithm
- Z Algorithm Z values
- Faster Suffix Sorting - Larsson+Sadakane
- How the Burrows-Wheeler Transform Works
- Suffix tree. Basics. Building in O(nlogn)
- Great resource for string algorithms
- Suffix tree. Ukkonen’s algorithm
- Trie - University of Craiova
- Regular Expression Matching Can Be Simple And Fast
- 5.4 Regular Expressions - Algorithms 4e
- An Efficient and Elegant Regular Expression Matcher in Python
- A Play on Regular Expressions
- Pattern Matching - Dartmouth College CS 10
- When is Rabin Karp more effective than KMP or Boyer-Moore?
- Regular Expression Quantifiers: Greedy, Lazy, Possessive
Recursion
- Interview Question: Recursion Problems - Stanford
- Exhaustive Recursion and Backtracking
- A Warnsdorff-Rule Algorithm for Knight’s Tours on Square Chessboards
- Unleashing the Power of Recursion to Solve Crossword Puzzles
Trees
- Binary Trees
- B Trees - University of Craiova
- Centroid Decomposition
- What is Centroid Decomposition?
- Centroid Decomposition
- Heavy light decomposition
- LCP array construction
- Least Common Ancestor
- Lowest Common Ancestor (LCA) Problem
- On computing a longest path in a tree
Graphs
General
- Decreasing Graph Complexity with Transitive Reductions
- Notes on transitive reductions
- Incremental Cycle Detection, Topological Ordering, and Strong Component Maintenance
- Existence of the de Bruijn Cycles
- Algorithms for De Bruijn Sequences
- Negative-Weight Cycle Algorithms
- HashLife - Rokicki
- An Algorithm for Compressing Space and Time (Conway’s Life)
- The Weisfeiler-Lehman Isomorphism Test
- Graph Isomorphisms
- A Short Tutorial on the Weisfeiler-Lehman Test and its Variants
Traversal
- Depth-First Search and Linear Graph Algorithms - Tarjan
- Introduction to the A* Algorithm
- Implementation of A*
- Topological Sort
Range Queries
- A New Data Structure for Cumulative Frequency Tables
- Fenwick Tree (Binary Index Tree)
- Fenwick Tree
- Segment Tree Data Structure
- Efficient and easy segment trees
- Sparse Table Data Structure
- Segment Tree Range Minimum Query
Connectivity
- Solving 2-List Coloring (by Reducing to 2-SAT)
- Episode 24 - 2SAT
- Graph Contraction and Connectivity - Carnegie Mellon University
- Eager Prim’s Minimum Spanning Tree Algorithm
- The Welsh-Powell Algorithm
Matroids
Circuits
Shortest Paths
- A Note on Practical Construction Of Maximum Bandwidth Paths - Malpani+Chen
- A Practical Shortest Path Problem with Linear Expected Time - Goldberg
- Bottleneck Spanning Tree Homework - Cheng
- Everything about Bottleneck Spanning Tree
- Faster Algorithms for the Shortest Path Problem
- Graph Algorithms II
- Implementations of Dijkstra’s Algorithm Based on Multi-Level Buckets - Goldberg+Silverstein
- Rec 16 - MIT 6.006 Spring 11
- On the Bottleneck Shortest Path Problem - Kaibel+Peinhardt
- Practical Efficiency of the Linear-time Algorithm for the Single Source Shortest Path Problem - Asano+Imai
- Undirected Single Source Shortest Paths in Linear Time - Thorup
- T-joins and Applications
- Shortest Path Algorithms - Goddyn
- Shortest Paths - Ahuja
- Dijkstra’s Algorithm with Simple Buckets - MIT 15.082J
- Modifying Dijkstra’s Algorithm for Edge Weights Drawn from Range
- Dijkstra’s Algorithm for Edge Weights in Range
- Accelerating Johnson’s All-Pairs Shortest Paths Algorithm on GPU
- Solving All Pairs Shortest Paths in Parallel
Network Flow
- Hopcroft-Karp algorithm - Wikipedia
- Maximum Bipartite Matching Problem
- Algorithms for Enumerating All Perfect, Maximum and Maximal Matchings in Bipartite Graphs
- Bipartite Maximum Matching - IIT Bombay
- Dinic’s Algorithm
- Algorithms - Blum
- A Second Course in Algorithms - Roughgarden
- A Fast and Simple Algorithm for the Maximum Flow Problem
- Ford Fulkerson Algorithm Edmonds Karp Algorithm For Max Flow
- Maximum Bipartite Matching - University of Maryland
Dynamic Programming
- 19. Dynamic Programming I: Fibonacci, Shortest Paths - MIT 6.006
- 20. Dynamic Programming II: Text Justification, Blackjack - MIT 6.006
- 21. DP III: Parenthesization, Edit Distance, Knapsack - MIT 6.006
- Approximate String Matching
- Dynamic Programming I - Carnegie Mellon University
- Egg Dropping
- MWIS in a Tree - Chen+Kuo+Sheu
- The Knapsack Problem - MIT 6.006
- Optimal BST - Carnegie Mellon University
- Optimal BST - University of Craiova
- Space-Efficient Alignment - Carnegie Mellon University
- Dynamic Programming I - Carnegie Mellon University
- Exercise3+4 Solutions - CTH
- Convex Hull Optimization
- Convex Hull Trick
NP-Complete
- What are the Differences between NP, NP-Complete and NP-Hard - Stack Overflow
- The Traveling Salesman Problem - University of Crete
- Traveling Salesperson: The Most Misunderstood Problem
- Polynomial Time Approximation Schemes for Euclidean Traveling Salesman and other Geometric Problems - Arora
- Notes on NP Completeness - Schwartz
- Maximum Matching in Bipartite and Non-Bipartite Graphs - Zwick
- Maximum Independent Set Problem - Chekuri
- The Traveling Salesperson Problem - Chekuri
- The Traveling Salesperson Problem - Roughgarden
- The An-Kleinberg-Shmoys Algorithm for the TSP - Carnegie Mellon University
- Design and Analysis of Algorithms (#24) - Panigrahi
- Approximating the Minimum Degree Spanning Tree - Furer
- The P vs. NP Problem - Cook
- Dynamic Programming for Minimum Steiner Trees
- Steiner Tree NP-Completeness Proof - Santuari
- Graph Algorithms - Panigraphi
- Combinatorial Optimization - MIT 18.453
- Steiner Trees - Utrecht University
- Efficient algorithms for Steiner Tree Problem - Meng
- Comparing Between Different Approaches to Solve the 0/1 Knapsack Problem
- Longest Path in a DAG - Khan
- How Easy is Local Search - Johnson+Papadimitriou+Yannkakis
- The Capacitated Max K-Cut Problem - Gaur+Krishnamurti+Kohli
- An Overview of What We Can and Cannot Do with Local Search - Christopoulos+Zissimopoulos
- Approximation Algorithms - Dinitz
- Approximation Algorithms (2011) - Chekuri
- Lec-24 Traveling Salesman Problem(TSP) - IIT Madras
- Design and Analysis of Algorithms (#16) - Panigrahi
- Approximation Algorithms (2011) - Chekuri
- Greedy Approximation - University of Maryland
- Approximation Algorithms - University of Maryland
- Approximation Algorithms - Zadeh
- Approximation Algorithms - Warnow
- TSP Heuristics - Leading Methods, Implementations and Latest Advances
Lectures 24 through 27 are all related to TSP.
Leave a comment