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=LVcNxxsghiU) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=LVcNxxsghiU) [](https://www.youtube.com/watch?v=LVcNxxsghiU) Given an integer array `nums`, find the subarray with the largest sum, and return _its sum_. **Example 1:** Input: nums =...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=W1PVevGznGI) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=W1PVevGznGI) [](https://www.youtube.com/watch?v=W1PVevGznGI) The n-queens puzzle is the problem of placing `n` queens on an `n x n` chessboard such that no two queens...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=TpiavO7AXy4) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=TpiavO7AXy4) [](https://www.youtube.com/watch?v=TpiavO7AXy4) The n-queens puzzle is the problem of placing `n` queens on an `n x n` chessboard such that no two queens...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=8U8j2SHMSG4) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=8U8j2SHMSG4) [](https://www.youtube.com/watch?v=8U8j2SHMSG4) Implement [pow(x, n)](http://www.cplusplus.com/reference/valarray/pow/), which calculates `x` raised to the power `n` (i.e., `x^n`). **Example 1:** Input: x = 2.00000, n =...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=hZ9IpZuOln8) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=hZ9IpZuOln8) [](https://www.youtube.com/watch?v=hZ9IpZuOln8) Given an array of strings `strs`, group the anagrams together. You can return the answer in any order. An Anagram is...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=8RIeLfsv3LI) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=8RIeLfsv3LI) [](https://www.youtube.com/watch?v=8RIeLfsv3LI) You are given an `n x n` 2D `matrix` representing an image, rotate the image by 90 degrees (clockwise). You have...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=Rv9si9nNSAk) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=Rv9si9nNSAk) [](https://www.youtube.com/watch?v=Rv9si9nNSAk) Given an array `nums` of distinct integers, return _all the possible permutations_. You can return the answer in any order. **Example...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=TWmuw4uxCvM) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=TWmuw4uxCvM) [](https://www.youtube.com/watch?v=TWmuw4uxCvM) You are given a 0-indexed array of integers `nums` of length `n`. You are initially positioned at `nums[0]`. Each element `nums[i]`...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=rwexIiDcupg) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=rwexIiDcupg) [](https://www.youtube.com/watch?v=rwexIiDcupg) Given an input string (`s`) and a pattern (`p`), implement wildcard pattern matching with support for `'?'` and `'*'` where: *...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=QUY63hLMQO4) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=QUY63hLMQO4) [](https://www.youtube.com/watch?v=QUY63hLMQO4) Given two non-negative integers `num1` and `num2` represented as strings, return the product of `num1` and `num2`, also represented as a...