Problem Statement In a 1 million by 1 million grid, the coordinates of each grid square are (x, y) with 0 <= x, y < 10^6. We start at the source square and want to reach the target square.  Each move, we can walk to a 4-directionally adjacent square…
In a 1 million by 1 million grid, the coordinates of each grid square are (x, y) with 0 <= x, y < 10^6. We start at the source square and want to reach the target square.  Each move, we can walk to a 4-directionally adjacent square in the grid that…
Problem Statement Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with another character while preserving the ord…
Problem Statement Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. Example 1: Input: pattern = "abba",…
leetcode solution cracked tutorial problemset https://leetcode.com/problemset/all/ Top Interview Questions https://leetcode.com/problemset/all/?listId=wpwgkgt free solution hack ways leetcode solutions 破解教程 https://github.com/xgqfrms/leetcode/issues/…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 日期 题目地址:https://leetcode.com/problems/escape-the-ghosts/description/ 题目描述 You are playing a simplified Pacman game. You start at the point (0, 0), and your destination is (targ…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 日期 题目地址:https://leetcode.com/problems/positions-of-large-groups/description/ 题目描述 In a string S of lowercase letters, these letters form consecutive groups of the same characte…
You are playing a simplified Pacman game. You start at the point (0, 0), and your destination is(target[0], target[1]). There are several ghosts on the map, the i-th ghost starts at (ghosts[i][0], ghosts[i][1]). Each turn, you and all ghosts simultan…
Problem Statement Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty substring in str. Example 1: Input: pattern = "abab&q…
Problem Statement Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division should truncate toward zero. Example 1: Inp…