Given an array of integers nums sorted in ascending order, find the starting and ending position of a given ta…
分类:LeetCode题目解答
[LeetCode] Group Anagrams 群组错位词
Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat",…
[LeetCode] Verify Preorder Sequence in Binary Search Tree 验证二叉搜索树的先序序列
Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary sea…
[LeetCode] Combination Sum III 组合之和之三,Combination Sum,Combination Sum II,Combinations
Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 t…
991. Broken Calculator
On a broken calculator that has a number showing on its display, we can perform two operations:Double: Multipl…
[LeetCode] Robot Room Cleaner 扫地机器人
Given a robot cleaner in a room modeled as a grid. Each cell in the grid can be empty or blocked. The r…
[LeetCode] Product of Array Except Self 除本身之外的数组之积
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal …
[LeetCode] Hamming Distance 汉明距离
The Hamming distance between two integers is the number of positions at which the correspondi…
[LeetCode] Range Addition II 范围相加之二
Given an m * n matrix M initialized with all 0’s and several update operations. Op…
47. Permutations II
欢迎fork and star:Nowcoder-Repository-github 47. Permutations II 题目 Given a collection of numbers that might con…
[LeetCode] Sliding Puzzle 滑动拼图
On a 2×3 board, there are 5 tiles represented by the integers 1 through 5, and an empty squar…
LeetCode | Plus One
题目: Given a number represented as an array of digits, plus one to the number. 思路: 数组的遍历需要从右向左进行,然后结果存在临时数组中为从左…