leetcode
leetcode copied to clipboard
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=_E7IU0Fq1jg) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=_E7IU0Fq1jg) [](https://www.youtube.com/watch?v=_E7IU0Fq1jg) Given `n` non-negative integers representing an elevation map where the width of each bar is `1`, compute how much water it...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=NB7fzj6I9oA) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=NB7fzj6I9oA) [](https://www.youtube.com/watch?v=NB7fzj6I9oA) Given a collection of candidate numbers (`candidates`) and a target number (`target`), find all unique combinations in `candidates` where the candidate...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=vvP1GiUJfL8) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=vvP1GiUJfL8) [](https://www.youtube.com/watch?v=vvP1GiUJfL8) Given an array of distinct integers `candidates` and a target integer `target`, return _a list of all unique combinations of_`candidates` _where...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=_ITC1V9L8L8) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=_ITC1V9L8L8) [](https://www.youtube.com/watch?v=_ITC1V9L8L8) The **count-and-say** sequence is a sequence of digit strings defined by the recursive formula: * `countAndSay(1) = "1"` * `countAndSay(n)` is...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=cJdDY4UNTfI) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=cJdDY4UNTfI) [](https://www.youtube.com/watch?v=cJdDY4UNTfI) Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy **all of the...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=QFFotZ9jIOU) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=QFFotZ9jIOU) [](https://www.youtube.com/watch?v=QFFotZ9jIOU) Given a sorted array of distinct integers and a target value, return the index if the target is found. If not,...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=FdmKG8RRbZU) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=FdmKG8RRbZU) [](https://www.youtube.com/watch?v=FdmKG8RRbZU) Given an array of integers `nums` sorted in non-decreasing order, find the starting and ending position of a given `target` value....
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=T188U8G-QPA) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=T188U8G-QPA) [](https://www.youtube.com/watch?v=T188U8G-QPA) There is an integer array `nums` sorted in ascending order (with **distinct** values). Prior to being passed to your function, `nums`...
Leetcode 38 incorrect answer
15. 三数之和