AI Wisdom
Learning Track

Algorithms & DS

Sorting, graph traversal, dynamic programming, trees, heaps, recursion and Big-O analysis — the foundations every engineer needs.

7+
Topics
5
Published
100%
Free
Browse articles ↓

7 articlesin Algorithms & DS

Algorithms & DS
Dijkstra’s shortest path for delivery routing: start at distance zero, repeatedly pop the closest junction from a min-heap, skip stale entries, relax each road by travel minutes, and stop when the destination is popped; A* adds a distance estimate.Dijkstra’s shortest path for delivery routing: start at distance zero, repeatedly pop the closest junction from a min-heap, skip stale entries, relax each road by travel minutes, and stop when the destination is popped; A* adds a distance estimate.

Dijkstra in C#: PriorityQueue, A*, and Why Negative Edges Break It

AdvancedPRO

Production Dijkstra with .NET PriorityQueue and the skip-stale pattern, path reconstruction, A* with admissible heuristics, multi-source variants, and Bellman-Ford for negatives.

Updated 14 min
Read →
Algorithms & DS
Graph traversal on service dependencies: Kahn’s topological sort produces a deploy order and reports cycles as leftover nodes, BFS lists the blast radius by hops, and every traversal keeps a visited set.Graph traversal on service dependencies: Kahn’s topological sort produces a deploy order and reports cycles as leftover nodes, BFS lists the blast radius by hops, and every traversal keeps a visited set.

Graph Traversal: BFS, DFS, Topological Sort, and the Visited Set

Intermediate

Adjacency list vs matrix, BFS for unweighted shortest path, DFS recursive vs iterative, Kahn's topological sort, three-colour cycle detection, and connected components.

Updated 13 min
Read →
Algorithms & DS
Choosing a tree: a trie with top completions stored at each node serves prefix autocomplete, a self-balancing tree keeps ordered data logarithmic whatever the insert order, and stored data uses the database’s B-tree indexes.Choosing a tree: a trie with top completions stored at each node serves prefix autocomplete, a self-balancing tree keeps ordered data logarithmic whatever the insert order, and stored data uses the database’s B-tree indexes.

Trees: BSTs, Balance, and Why SortedDictionary Is Red-Black

Intermediate

BST vs self-balancing (red-black, AVL), B-trees in databases, heaps with PriorityQueue, tries for prefix queries, and iterative traversals that don't blow the stack.

Updated 13 min
Read →
Algorithms & DS
Dynamic programming for edit distance: define the subproblem, write the recurrence, fill a table bottom-up so each cell is computed once, keep only two rows, and stop early when a row exceeds the allowed distance.Dynamic programming for edit distance: define the subproblem, write the recurrence, fill a table bottom-up so each cell is computed once, keep only two rows, and stop early when a row exceeds the allowed distance.

Dynamic Programming: State, Recurrence, Base Case, Order

AdvancedPRO

Top-down memoization vs bottom-up tables, coin change, 0/1 knapsack with reverse iteration, edit distance, LIS in O(n log n), and reconstructing the solution.

Updated 15 min
Read →
Algorithms & DS
Safe recursion over a category tree: every call has a base case and makes progress, a visited set detects cycles in imported data, an explicit stack replaces the call stack for unbounded depth, and memoisation removes repeated work.Safe recursion over a category tree: every call has a base case and makes progress, a visited set detects cycles in imported data, an explicit stack replaces the call stack for unbounded depth, and memoisation removes repeated work.

Recursion: When It's Elegant, When It's a Stack Overflow

Intermediate

Base/recursive/combine, memoization vs iteration, why .NET doesn't reliably tail-call optimize, and converting recursion to an explicit Stack<T> for adversarial depth.

Updated 12 min
Read →
Algorithms & DS
Sorting done right: use the library sort with a chained comparator that never subtracts, a stable sort or unique final key for deterministic ties, and sort large data in the database or stream it instead of loading it into memory.Sorting done right: use the library sort with a chained comparator that never subtracts, a stable sort or unique final key for deterministic ties, and sort large data in the database or stream it instead of loading it into memory.

Sorting in 2026: Introsort, Stability, and When to Reach for Radix

Intermediate

.NET introsort vs LINQ stable OrderBy, comparator rules (never a - b), 0/1 vs unbounded knapsack-style iteration, counting sort, and external merge sort for data > RAM.

Updated 13 min
Read →
Algorithms & DS
Binary search with one invariant: the half-open range low to high shrinks each step using an overflow-safe midpoint until low equals high at the lower bound, finding a position in 10 million sorted items in about 24 comparisons.Binary search with one invariant: the half-open range low to high shrinks each step using an overflow-safe midpoint until low equals high at the lower bound, finding a position in 10 million sorted items in about 24 comparisons.

Binary Search: One Template That Solves Every Variant

Intermediate

Half-open [low, high) invariant, lower-bound and upper-bound, first/last occurrence, binary search on the answer, floating-point search, and the BCL helpers.

Updated 12 min
Read →