Loading...
Loading...
A growing set of coding problems solved locally with tests, then published as concise markdown explanations.
May 29, 2026
Given an elevation map of unit-width bars, compute how much rain water is trapped between them.
May 23, 2026
A class that builds strings efficiently by accumulating chunks in an array and joining once. Avoids the O(n²) cost of repeated string concatenation in a loop.
May 14, 2026
Given an integer array, return all unique triplets where the three values sum to zero.
March 13, 2026
Given an array of strings, group all anagrams together and return the groups in any order.
March 11, 2026
Scan the Roman numeral string and subtract a symbol's value when it precedes a larger one, otherwise add it.
March 10, 2026
Given two binary strings, return their sum as a binary string. We use BigInt for correct arbitrary-precision arithmetic instead of a manual carry simulation.
March 7, 2026
Given a string of words and spaces, return the length of the last word.
March 7, 2026
Use a stack of opening brackets and match each closing bracket against the most recent unmatched opener.
March 3, 2026
Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 when needle is not part of haystack.