~/lc-grind
#138 - Copy List with Random Pointer
Oct 27, 2025Master the art of creating a perfect deep copy of a special linked list where each node contains both next and random pointers, ensuring no connections to the original list remain.
#2 - Add Two Numbers
Oct 24, 2025Add two numbers represented as reverse-digit linked lists, handling carries with ease, and return the result as a new linked list.
#224 - Basic Calculator
Oct 23, 2025Master the art of evaluating complex arithmetic expressions with parentheses and unary minus by implementing a stack-based solution that respects operator precedence without using eval().
#150 - Evaluate Reverse Polish Notation
Oct 22, 2025Efficiently evaluate postfix expressions using a stack to handle operators and operands, simplifying complex arithmetic by processing tokens in reverse polish notation.
#155 - Min Stack
Oct 21, 2025Design a stack that supports push, pop, top, and retrieving the minimum element—all in constant O(1) time.
#71 - Simplify Path
Oct 20, 2025Use a stack to process directory tokens, resolving parent ".." and ignoring current "." directories, to build the cleanest possible absolute path.
#452 - Minimum Number of Arrows to Burst Balloons
Oct 17, 2025Shoot the fewest arrows vertically to burst all balloons by strategically targeting overlapping intervals, a classic greedy approach solved by sorting and scanning.
#228 - Summary Ranges
Oct 16, 2025Transform a sorted array of unique integers into the smallest set of contiguous ranges, representing consecutive numbers as "a->b" and single numbers as "a".
#219 - Contains Duplicate II
Oct 15, 2025Check if an array contains two nearby duplicates, where the distance between their indices is at most k.
#202 - Happy Number
Oct 14, 2025Discover if repeatedly summing the squares of a number's digits leads to eternal happiness (1) or an endless cycle of despair.