DEV Community

DSA & Algorithms in Python Series' Articles

Back to Bimal Kshetri's Series
Floyd-Warshall in Python: Shortest Paths Between Every Pair of Nodes
Cover image for Floyd-Warshall in Python: Shortest Paths Between Every Pair of Nodes

Floyd-Warshall in Python: Shortest Paths Between Every Pair of Nodes

Comments
22 min read
A* Search in Python: Dijkstra With a Sense of Direction
Cover image for A* Search in Python: Dijkstra With a Sense of Direction

A* Search in Python: Dijkstra With a Sense of Direction

Comments
23 min read
Minimum Spanning Trees in Python: Kruskal's and Prim's Algorithms
Cover image for Minimum Spanning Trees in Python: Kruskal's and Prim's Algorithms

Minimum Spanning Trees in Python: Kruskal's and Prim's Algorithms

Comments
24 min read
Topological Sort in Python: Ordering Tasks That Depend on Each Other
Cover image for Topological Sort in Python: Ordering Tasks That Depend on Each Other

Topological Sort in Python: Ordering Tasks That Depend on Each Other

Comments
19 min read
Dynamic Programming Explained: Memoization, Tabulation, and How to Spot It
Cover image for Dynamic Programming Explained: Memoization, Tabulation, and How to Spot It

Dynamic Programming Explained: Memoization, Tabulation, and How to Spot It

Comments
19 min read
The 0/1 Knapsack Problem in Python: The Classic DP Every Interview Uses
Cover image for The 0/1 Knapsack Problem in Python: The Classic DP Every Interview Uses

The 0/1 Knapsack Problem in Python: The Classic DP Every Interview Uses

Comments
21 min read
Longest Common Subsequence in Python: How diff Tools Work
Cover image for Longest Common Subsequence in Python: How diff Tools Work

Longest Common Subsequence in Python: How diff Tools Work

Comments
17 min read
Edit Distance (Levenshtein) in Python: Measuring How Different Two Strings Are
Cover image for Edit Distance (Levenshtein) in Python: Measuring How Different Two Strings Are

Edit Distance (Levenshtein) in Python: Measuring How Different Two Strings Are

Comments
20 min read
The Coin Change Problem in Python: Where Greedy Fails and DP Wins
Cover image for The Coin Change Problem in Python: Where Greedy Fails and DP Wins

The Coin Change Problem in Python: Where Greedy Fails and DP Wins

Comments
21 min read
Greedy Algorithms Explained: When Taking the Best Option Now Actually Works
Cover image for Greedy Algorithms Explained: When Taking the Best Option Now Actually Works

Greedy Algorithms Explained: When Taking the Best Option Now Actually Works

Comments
17 min read
Huffman Coding in Python: How Compression Actually Compresses
Cover image for Huffman Coding in Python: How Compression Actually Compresses

Huffman Coding in Python: How Compression Actually Compresses

Comments
23 min read
Recursion and Backtracking in Python: Building the Mental Model
Cover image for Recursion and Backtracking in Python: Building the Mental Model

Recursion and Backtracking in Python: Building the Mental Model

Comments
19 min read
The N-Queens Problem in Python: Backtracking at Its Clearest
Cover image for The N-Queens Problem in Python: Backtracking at Its Clearest

The N-Queens Problem in Python: Backtracking at Its Clearest

Comments
18 min read
The KMP Algorithm in Python: String Search Without Ever Going Backwards
Cover image for The KMP Algorithm in Python: String Search Without Ever Going Backwards

The KMP Algorithm in Python: String Search Without Ever Going Backwards

Comments
19 min read
Rabin-Karp in Python: Finding Substrings With Rolling Hashes
Cover image for Rabin-Karp in Python: Finding Substrings With Rolling Hashes

Rabin-Karp in Python: Finding Substrings With Rolling Hashes

Comments
19 min read
The Euclidean Algorithm in Python: The Oldest Algorithm Still in Daily Use
Cover image for The Euclidean Algorithm in Python: The Oldest Algorithm Still in Daily Use

The Euclidean Algorithm in Python: The Oldest Algorithm Still in Daily Use

Comments
18 min read
Sieve of Eratosthenes in Python: Every Prime Under a Million, Fast
Cover image for Sieve of Eratosthenes in Python: Every Prime Under a Million, Fast

Sieve of Eratosthenes in Python: Every Prime Under a Million, Fast

Comments
20 min read
Fast Exponentiation in Python: Computing Huge Powers in log n Steps
Cover image for Fast Exponentiation in Python: Computing Huge Powers in log n Steps

Fast Exponentiation in Python: Computing Huge Powers in log n Steps

Comments
15 min read
The Two Pointers Technique in Python: Turning O(n ) Into O(n)
Cover image for The Two Pointers Technique in Python: Turning O(n ) Into O(n)

The Two Pointers Technique in Python: Turning O(n ) Into O(n)

Comments
20 min read
The Sliding Window Technique in Python: Subarray Problems Made Linear
Cover image for The Sliding Window Technique in Python: Subarray Problems Made Linear

The Sliding Window Technique in Python: Subarray Problems Made Linear

Comments
22 min read
Prefix Sums in Python: Answering Range Queries in Constant Time
Cover image for Prefix Sums in Python: Answering Range Queries in Constant Time

Prefix Sums in Python: Answering Range Queries in Constant Time

Comments
20 min read
Building an LRU Cache in Python: The Data Structure Behind Every Cache
Cover image for Building an LRU Cache in Python: The Data Structure Behind Every Cache

Building an LRU Cache in Python: The Data Structure Behind Every Cache

Comments
22 min read