~/lc-grind
#114 - Flatten Binary Tree to Linked List
Nov 10, 2025Transform a binary tree into a right-skewed linked list in-place, following the node order of a pre-order traversal.
#117 - Populating Next Right Pointers in Each Node II
Nov 7, 2025Connect every node in a binary tree to its next right node, efficiently linking level-order neighbors even when the tree is imperfect, using BFS or an optimized constant-space approach.
#106 - Construct Binary Tree from Inorder and Postorder Traversal
Nov 6, 2025Master the classic tree construction challenge where you'll cleverly leverage the last element of postorder as the root and strategically divide the inorder array to recursively build a binary tree from its traversal sequences.
#101 - Symmetric Tree
Nov 5, 2025Determine if a binary tree is a mirror image of itself by exploring its structure both recursively and iteratively.
#146 - LRU Cache
Nov 4, 2025Design an O(1) time LRU Cache that efficiently evicts the least recently used item when capacity is exceeded, using a combination of hash map and doubly-linked list.
#86 - Partition List
Nov 3, 2025Partition a linked list around a value x, preserving the original relative order of nodes in both the "less than" and "greater than or equal" partitions.
#61 - Rotate List
Oct 31, 2025Shift a linked list to the right by `k` places by cleverly connecting its tail to its head and finding the new break point.
#82 - Remove Duplicates from Sorted List II
Oct 30, 2025Given a sorted linked list, completely remove all nodes with duplicate values, preserving only the elements that appear exactly once.
#25 - Reverse Nodes in k-Group
Oct 29, 2025Master the art of reversing every k nodes in a linked list in-place, a challenging recursion and pointer manipulation problem that demands precision.
#92 - Reverse Linked List II
Oct 28, 2025Master the art of surgically reversing a specific sublist within a singly linked list, from position `left` to `right`, in a single pass.