Series
Algorithm Study
Algorithm problem solving, data structures, and complexity analysis notes. 16 posts.
-
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