@@ -163,6 +163,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
163163| Graph | ` graph.py ` | ` Node ` , ` DirectedEdge ` , ` DirectedGraph ` |
164164| Hash Table | ` hash_table.py ` | ` HashTable ` , ` ResizableHashTable ` |
165165| Heap | ` heap.py ` | ` BinaryHeap ` |
166+ | KD Tree | ` kd_tree.py ` | ` KDTree ` |
166167| Linked List | ` linked_list.py ` | ` SinglyLinkedListNode ` , ` DoublyLinkedListNode ` |
167168| Priority Queue | ` priority_queue.py ` | ` PriorityQueue ` |
168169| Queue | ` queue.py ` | ` ArrayQueue ` , ` LinkedListQueue ` |
@@ -213,6 +214,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
213214- [ permute] ( algorithms/backtracking/permute.py ) &mdash ; generate all permutations of distinct elements
214215- [ permute_unique] ( algorithms/backtracking/permute_unique.py ) &mdash ; generate unique permutations when duplicates exist
215216- [ subsets] ( algorithms/backtracking/subsets.py ) &mdash ; generate all subsets (power set)
217+ - [ minimax] ( algorithms/backtracking/minimax.py ) &mdash ; game-tree search with alpha-beta pruning
216218- [ subsets_unique] ( algorithms/backtracking/subsets_unique.py ) &mdash ; generate unique subsets when duplicates exist
217219
218220### Bit Manipulation
@@ -226,6 +228,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
226228- [ find_difference] ( algorithms/bit_manipulation/find_difference.py ) &mdash ; find the added character between two strings using XOR
227229- [ find_missing_number] ( algorithms/bit_manipulation/find_missing_number.py ) &mdash ; find a missing number in a sequence using XOR
228230- [ flip_bit_longest_sequence] ( algorithms/bit_manipulation/flip_bit_longest_sequence.py ) &mdash ; longest run of 1s after flipping a single 0
231+ - [ gray_code] ( algorithms/bit_manipulation/gray_code.py ) &mdash ; generate Gray code sequences and convert between Gray and binary
229232- [ has_alternative_bit] ( algorithms/bit_manipulation/has_alternative_bit.py ) &mdash ; check if binary representation has alternating bits
230233- [ insert_bit] ( algorithms/bit_manipulation/insert_bit.py ) &mdash ; insert bits at a specific position in an integer
231234- [ power_of_two] ( algorithms/bit_manipulation/power_of_two.py ) &mdash ; check if an integer is a power of two
@@ -245,10 +248,12 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
245248
246249### Dynamic Programming
247250
251+ - [ bitmask] ( algorithms/dynamic_programming/bitmask.py ) &mdash ; travelling salesman problem via bitmask dynamic programming
248252- [ buy_sell_stock] ( algorithms/dynamic_programming/buy_sell_stock.py ) &mdash ; maximize profit from a stock price array
249253- [ climbing_stairs] ( algorithms/dynamic_programming/climbing_stairs.py ) &mdash ; count ways to climb stairs taking 1 or 2 steps
250254- [ coin_change] ( algorithms/dynamic_programming/coin_change.py ) &mdash ; minimum coins to make a given amount
251255- [ combination_sum] ( algorithms/dynamic_programming/combination_sum.py ) &mdash ; count combinations that sum to a target (with reuse)
256+ - [ count_paths_dp] ( algorithms/dynamic_programming/count_paths_dp.py ) &mdash ; count paths in a grid using recursion, memoization, and bottom-up DP
252257- [ edit_distance] ( algorithms/dynamic_programming/edit_distance.py ) &mdash ; minimum edits to transform one string into another
253258- [ egg_drop] ( algorithms/dynamic_programming/egg_drop.py ) &mdash ; minimize trials to find the critical floor
254259- [ fibonacci] ( algorithms/dynamic_programming/fib.py ) &mdash ; compute Fibonacci numbers with memoization
@@ -276,6 +281,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
276281- [ all_factors] ( algorithms/graph/all_factors.py ) &mdash ; find all factor combinations of a number
277282- [ all_pairs_shortest_path] ( algorithms/graph/all_pairs_shortest_path.py ) &mdash ; Floyd-Warshall all-pairs shortest paths
278283- [ bellman_ford] ( algorithms/graph/bellman_ford.py ) &mdash ; single-source shortest path with negative edge weights
284+ - [ blossom] ( algorithms/graph/blossom.py ) &mdash ; Edmonds' blossom algorithm for maximum matching in general graphs
279285- [ check_bipartite] ( algorithms/graph/check_bipartite.py ) &mdash ; determine if a graph is two-colorable
280286- [ check_digraph_strongly_connected] ( algorithms/graph/check_digraph_strongly_connected.py ) &mdash ; check if a directed graph is strongly connected
281287- [ clone_graph] ( algorithms/graph/clone_graph.py ) &mdash ; deep-copy an undirected graph
@@ -371,7 +377,9 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
371377- [ hailstone] ( algorithms/math/hailstone.py ) &mdash ; Collatz conjecture (hailstone) sequence
372378- [ is_strobogrammatic] ( algorithms/math/is_strobogrammatic.py ) &mdash ; check if a number looks the same upside-down
373379- [ krishnamurthy_number] ( algorithms/math/krishnamurthy_number.py ) &mdash ; check if a number equals the sum of the factorials of its digits
380+ - [ linear_regression] ( algorithms/math/linear_regression.py ) &mdash ; ordinary least-squares linear regression with R² and RMSE
374381- [ magic_number] ( algorithms/math/magic_number.py ) &mdash ; check if a number is a magic number
382+ - [ manhattan_distance] ( algorithms/math/manhattan_distance.py ) &mdash ; compute Manhattan (L1) distance between two points in any dimension
375383- [ modular_exponential] ( algorithms/math/modular_exponential.py ) &mdash ; compute (base^exp) mod m efficiently
376384- [ modular_inverse] ( algorithms/math/modular_inverse.py ) &mdash ; compute the modular multiplicative inverse
377385- [ next_bigger] ( algorithms/math/next_bigger.py ) &mdash ; next larger number with the same digits
@@ -380,6 +388,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
380388- [ num_digits] ( algorithms/math/num_digits.py ) &mdash ; count the number of digits in an integer
381389- [ num_perfect_squares] ( algorithms/math/num_perfect_squares.py ) &mdash ; minimum perfect squares that sum to n
382390- [ polynomial] ( algorithms/math/polynomial.py ) &mdash ; polynomial and monomial arithmetic operations
391+ - [ polynomial_division] ( algorithms/math/polynomial_division.py ) &mdash ; polynomial long division returning quotient and remainder
383392- [ power] ( algorithms/math/power.py ) &mdash ; compute x^n via binary exponentiation
384393- [ prime_check] ( algorithms/math/prime_check.py ) &mdash ; check if a number is prime
385394- [ primes_sieve_of_eratosthenes] ( algorithms/math/primes_sieve_of_eratosthenes.py ) &mdash ; generate primes up to n using the Sieve of Eratosthenes
@@ -421,6 +430,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
421430### Searching
422431
423432- [ binary_search] ( algorithms/searching/binary_search.py ) &mdash ; search a sorted array in O(log n)
433+ - [ exponential_search] ( algorithms/searching/exponential_search.py ) &mdash ; search a sorted array by doubling the range then binary searching
424434- [ find_min_rotate] ( algorithms/searching/find_min_rotate.py ) &mdash ; find the minimum in a rotated sorted array
425435- [ first_occurrence] ( algorithms/searching/first_occurrence.py ) &mdash ; find the first occurrence of a target value
426436- [ generalized_binary_search] ( algorithms/searching/generalized_binary_search.py ) &mdash ; binary search with a custom predicate
@@ -432,6 +442,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
432442- [ search_insert] ( algorithms/searching/search_insert.py ) &mdash ; find the insertion position for a target value
433443- [ search_range] ( algorithms/searching/search_range.py ) &mdash ; find the first and last positions of a target
434444- [ search_rotate] ( algorithms/searching/search_rotate.py ) &mdash ; search in a rotated sorted array
445+ - [ sentinel_search] ( algorithms/searching/sentinel_search.py ) &mdash ; linear search optimized by placing a sentinel at the end
435446- [ ternary_search] ( algorithms/searching/ternary_search.py ) &mdash ; search by dividing the array into three parts
436447- [ two_sum] ( algorithms/searching/two_sum.py ) &mdash ; find two numbers that sum to a target
437448
@@ -488,6 +499,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
488499### String
489500
490501- [ add_binary] ( algorithms/string/add_binary.py ) &mdash ; add two binary number strings
502+ - [ alphabet_board_path] ( algorithms/string/alphabet_board_path.py ) &mdash ; navigate a 5×5 alphabet board to spell a target word
491503- [ atbash_cipher] ( algorithms/string/atbash_cipher.py ) &mdash ; Atbash substitution cipher (reverse the alphabet)
492504- [ breaking_bad] ( algorithms/string/breaking_bad.py ) &mdash ; spell a string using periodic-table element symbols
493505- [ caesar_cipher] ( algorithms/string/caesar_cipher.py ) &mdash ; Caesar shift cipher encryption / decryption
@@ -510,6 +522,7 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
510522- [ longest_common_prefix] ( algorithms/string/longest_common_prefix.py ) &mdash ; find the longest common prefix among strings
511523- [ longest_palindromic_substring] ( algorithms/string/longest_palindromic_substring.py ) &mdash ; find the longest palindromic substring
512524- [ make_sentence] ( algorithms/string/make_sentence.py ) &mdash ; break a string into valid dictionary words
525+ - [ manacher] ( algorithms/string/manacher.py ) &mdash ; find the longest palindromic substring in O(n) time
513526- [ merge_string_checker] ( algorithms/string/merge_string_checker.py ) &mdash ; check if a string is a valid merge of two others
514527- [ min_distance] ( algorithms/string/min_distance.py ) &mdash ; minimum deletions to make two strings equal
515528- [ multiply_strings] ( algorithms/string/multiply_strings.py ) &mdash ; multiply two numbers represented as strings
@@ -524,11 +537,13 @@ All core data structures live in [`algorithms/data_structures/`](algorithms/data
524537- [ roman_to_int] ( algorithms/string/roman_to_int.py ) &mdash ; convert a Roman numeral string to an integer
525538- [ rotate] ( algorithms/string/rotate.py ) &mdash ; rotate a string by k positions
526539- [ strip_url_params] ( algorithms/string/strip_url_params.py ) &mdash ; remove duplicate query parameters from a URL
540+ - [ swap_characters] ( algorithms/string/swap_characters.py ) &mdash ; check if one character swap can make two strings equal
527541- [ strong_password] ( algorithms/string/strong_password.py ) &mdash ; check minimum changes needed for a strong password
528542- [ text_justification] ( algorithms/string/text_justification.py ) &mdash ; justify text lines to a specified width
529543- [ unique_morse] ( algorithms/string/unique_morse.py ) &mdash ; count unique Morse code representations of words
530544- [ validate_coordinates] ( algorithms/string/validate_coordinates.py ) &mdash ; validate geographic latitude/longitude coordinates
531545- [ word_squares] ( algorithms/string/word_squares.py ) &mdash ; find all valid word squares from a word list
546+ - [ z_algorithm] ( algorithms/string/z_algorithm.py ) &mdash ; Z-array computation for linear-time pattern matching
532547
533548### Tree
534549
0 commit comments