657 Robot Return To Origin
Robot Return to Origin There is a robot starting at the position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot **ends up at **(0, 0) after it completes its...
Robot Return to Origin There is a robot starting at the position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot **ends up at **(0, 0) after it completes its...
Maximum Walls Destroyed by Robots There is an endless straight line populated with some robots and walls. You are given integer arrays robots, distance, and walls: robots[i] is the position of th...
Maximum Amount of Money Robot Can Earn You are given an m x n grid. A robot starts at the top-left corner of the grid (0, 0) and wants to reach the bottom-right corner (m - 1, n - 1). The robot c...
Robot Collisions There are n 1-indexed robots, each having a position on a line, health, and movement direction. You are given 0-indexed integer arrays positions, healths, and a string direction...
Lexicographically Smallest Generated String You are given two strings, str1 and str2, of lengths n and m, respectively. A string word of length n + m - 1 is defined to be generated by str1 and s...
Check if Strings Can be Made Equal With Operations II You are given two strings s1 and s2, both of length n, consisting of lowercase English letters. You can apply the following operation on any...
Check if Strings Can be Made Equal With Operations I You are given two strings s1 and s2, both of length 4, consisting of lowercase English letters. You can apply the following operation on any ...
Find the String with LCP We define the lcp matrix of any 0-indexed string word of n lowercase English letters as an n x n grid such that: lcp[i][j] is equal to the length of the **longest common...
Matrix Similarity After Cyclic Shifts You are given an m x n integer matrix mat and an integer k. The matrix rows are 0-indexed. The following proccess happens k times: **Even-indexed** rows (0...
Equal Sum Grid Partition II You are given an m x n matrix grid of positive integers. Your task is to determine if it is possible to make either one horizontal or one vertical cut on the grid such...