加载中...
分类详情
中等 分类
525-连续数组(Contiguous Array)
原文链接: https://leetcode-cn.com/problems/contiguous-array 英文原文Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1. Example 1: Input: nums = [0,1] Output: 2 Explanation: [0, 1] is the longest con…
2021-12-03
553-最优除法(Optimal Division)
原文链接: https://leetcode-cn.com/problems/optimal-division 英文原文You are given an integer array nums. The adjacent integers in nums will perform the float division. For example, for nums = [2,3,4], we will evaluate the expression "2/3/4". However, you can…
2021-12-03
554-砖墙(Brick Wall)
原文链接: https://leetcode-cn.com/problems/brick-wall 英文原文There is a rectangular brick wall in front of you with n rows of bricks. The ith row has some number of bricks each of the same height (i.e., one unit) but they can be of different widths. The tot…
2021-12-03
565-数组嵌套(Array Nesting)
原文链接: https://leetcode-cn.com/problems/array-nesting 英文原文You are given an integer array nums of length n where nums is a permutation of the numbers in the range [0, n - 1]. You should build a set s[k] = {nums[k], nums[nums[k]], nums[nums[nums[k]]], .…
2021-12-03
576-出界的路径数(Out of Boundary Paths)
原文链接: https://leetcode-cn.com/problems/out-of-boundary-paths 英文原文There is an m x n grid with a ball. The ball is initially at the position [startRow, startColumn]. You are allowed to move the ball to one of the four adjacent cells in the grid (possib…
2021-12-03
593-有效的正方形(Valid Square)
原文链接: https://leetcode-cn.com/problems/valid-square 英文原文Given the coordinates of four points in 2D space p1, p2, p3 and p4, return true if the four points construct a square. The coordinate of a point pi is represented as [xi, yi]. The input is not g…
2021-12-03
640-求解方程(Solve the Equation)
原文链接: https://leetcode-cn.com/problems/solve-the-equation 英文原文Solve a given equation and return the value of 'x' in the form of a string "x=#value". The equation contains only '+', '-' operation, the variable 'x' and its coefficient. You should retur…
2021-12-03