LeetCode 874: Walking Robot Simulation
A clear explanation of simulating robot movement on an infinite grid using direction vectors and obstacle lookup.
27 notes
A clear explanation of simulating robot movement on an infinite grid using direction vectors and obstacle lookup.
A clear explanation of solving Minimum Area Rectangle using diagonal point pairs and constant-time point lookup.
A clear explanation of solving Unique Email Addresses using string normalization and a hash set.
A hash set solution for finding the smallest number that can be hidden from all front-facing cards.
A suffix-removal solution for finding the shortest reference string that can encode every word.
A hash set and linked list traversal solution for counting consecutive components whose values appear in nums.
A set-based solution for counting how many different Morse code transformations appear among a list of words.
A clear explanation of solving Open the Lock using breadth-first search over lock states.
Count unique island shapes in a binary grid using DFS and relative coordinates.
A clear explanation of checking whether a binary tree can be split into two equal-sum trees by removing one edge.
A clear explanation of finding whether two different nodes in a binary search tree sum to a target value.
A clear explanation of Distribute Candies using a set to count candy types and a simple limit argument.
A clear explanation of splitting an array into four equal-sum parts using prefix sums and set-based search.
A clear explanation of finding all words that can be formed by concatenating at least two shorter words from the same list.
Find the minimum number of valid one-character gene mutations using breadth-first search.
A clear explanation of the Frog Jump problem using dynamic programming with reachable jump sizes.
A clear explanation of designing a phone directory that can allocate, check, and release numbers efficiently.
A clear explanation of implementing Snake Game with a deque for body order and a set for constant-time collision checks.
A clear explanation of detecting whether equal values appear within distance k using a hash map or sliding window set.
A clear explanation of detecting duplicates in an array using a hash set and sorting.
A clear explanation of detecting whether repeated digit-square sums eventually reach 1.
Return all valid sentences formed by inserting spaces into a string so every word belongs to the dictionary, using DFS with memoization.
Decide whether a string can be segmented into dictionary words using dynamic programming over prefixes.
Find the longest run of consecutive integers in an unsorted array using a hash set and sequence-start detection.
Use breadth-first search to find the shortest transformation sequence length between two words.
Find all shortest word transformation sequences using BFS to build shortest-path parents, then backtracking to reconstruct every answer.
A clear explanation of the longest substring problem using sliding window and a hash set.