Tag
algorithm
32 posts tagged with algorithm.
-
A Python matrix simulation using direction vectors and in-place visit markers
-
An O(n²) Python DP solution that tracks the longest increasing subsequence ending at each index
-
A WordDictionary implementation using a Trie for storage and DFS for wildcard search
-
A Python two-pointer solution that moves the height limiting the current area
-
A Python stack solution that validates bracket type and closing order
-
Implementing a Trie with fixed 26-child nodes and an is_end marker
-
A Python dynamic programming solution for checking whether a string can be segmented by a word dictionary
-
Encoding and restoring a list of strings by recording each string's length and a delimiter
-
Grouping anagram strings by using each sorted string as the hash map key
-
A one-pass Python solution that tracks the lowest earlier price to calculate maximum profit
-
A Python DFS and memoization solution that stores the minimum coin count for each remaining amount
-
A Python DFS and backtracking solution that marks visited board cells in place
-
A Python binary search solution for the minimum value in a rotated sorted array
-
A Python DFS solution that compares the depths of the left and right subtrees
-
A Python solution that merges two sorted linked lists with a dummy node and moving pointers
-
A Python recursion and memoization solution that counts valid one-digit and two-digit decodings
-
A Python solution using Kadane's algorithm to find the maximum sum of a contiguous subarray
-
A Python backtracking solution to Combination Sum using a start index and pruning
-
A Python solution that counts 1 bits by repeatedly dividing by 2
-
A two-pointer Python solution for checking palindromes after normalizing alphanumeric characters
-
A DFS Python solution for checking whether a BST is built with valid value ranges
-
A 3Sum solution using sorting and a two-sum-style hash map approach.
-
A left-product and right-product solution for Product of Array Except Self.
-
A recursion and memoization write-up for the Climbing Stairs problem.
-
A comparison of sorting and character counting for the Valid Anagram problem.
-
Solving the rob-or-skip choice with top-down DP and memoization
-
Using a set to count each consecutive sequence only from its starting point
-
Using frequency counting and bucket arrays to return the top k frequent elements
-
Comparing brute force, two-pass hash map, and one-pass hash map approaches for Two Sum
-
Comparing brute force, sorting, and hash set approaches for duplicate detection
-
Solving BST range sum through BFS, DFS, and prefix sums
-
Why a modified Bellman-Ford approach fits the K-stop constraint better, and some implementation notes