leetcode
leetcode copied to clipboard
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
There are `n` people that are split into some unknown number of groups. Each person is labeled with a unique ID from `0` to `n - 1`. You are given...
Given an integer number `n`, return the difference between the product of its digits and the sum of its digits. Example 1: Input: n = 234 Output: 15 Explanation: Product...
Given a `m * n` matrix of ones and zeros, return how many square submatrices have all ones. Example 1: Input: matrix = [ [0,1,1,1], [1,1,1,1], [0,1,1,1] ] Output: 15...
Given two integers `tomatoSlices` and `cheeseSlices`. The ingredients of different burgers are as follows: * Jumbo Burger: `4` tomato slices and `1` cheese slice. * Small Burger: `2` Tomato slices...
Tic-tac-toe is played by two players `A` and `B` on a `3 x 3` grid. The rules of Tic-Tac-Toe are: * Players take turns placing characters into empty squares `'...
You have a pointer at index `0` in an array of size `arrLen`. At each step, you can move 1 position to the left, 1 position to the right in...
Given an array of strings `products` and a string `searchWord`. We want to design a system that suggests at most three product names from `products` after each character of `searchWord` ...
On a 2D plane, there are `n` points with integer coordinates `points[i] = [xi, yi]`. Return *the minimum time in seconds to visit all the points in the order given...
A storekeeper is a game in which the player pushes boxes around in a warehouse trying to get them to target locations. The game is represented by an `m x...
Given an array `nums` of integers, we need to find the maximum possible sum of elements of the array such that it is divisible by three. Example 1: Input: nums...