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=TR8-kXs62RE) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=TR8-kXs62RE) [](https://www.youtube.com/watch?v=TR8-kXs62RE) You are given an `m x n` integer matrix `matrix` with the following two properties: * Each row is sorted in...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=Pmqyvr3Y7fM) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=Pmqyvr3Y7fM) [](https://www.youtube.com/watch?v=Pmqyvr3Y7fM) Given an `m x n` integer matrix `matrix`, if an element is `0`, set its entire row and column to `0`'s....
Equations are given in the format `A / B = k`, where `A` and `B` are variables represented as strings, and `k` is a real number (floating point number). Given...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=velsW3UnlsQ) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=velsW3UnlsQ) [](https://www.youtube.com/watch?v=velsW3UnlsQ) Given a string `path`, which is an absolute path (starting with a slash `'/'`) to a file or directory in a...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=QzDIk92dQAw) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=QzDIk92dQAw) [](https://www.youtube.com/watch?v=QzDIk92dQAw) You are climbing a staircase. It takes `n` steps to reach the top. Each time you can either climb `1` or...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=UtatLQlm_7c) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=UtatLQlm_7c) [](https://www.youtube.com/watch?v=UtatLQlm_7c) Given a non-negative integer `x`, return _the square root of_`x` _rounded down to the nearest integer_. The returned integer should be...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=fTysvEqtt6M) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=fTysvEqtt6M) [](https://www.youtube.com/watch?v=fTysvEqtt6M) Given an array of strings `words` and a width `maxWidth`, format the text such that each line has exactly `maxWidth` characters...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=4ncHDFJWAw8) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=4ncHDFJWAw8) [](https://www.youtube.com/watch?v=4ncHDFJWAw8) Given two binary strings `a` and `b`, return _their sum as a binary string_. **Example 1:** Input: a = "11", b...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=AyygTVlAJbo) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=AyygTVlAJbo) [](https://www.youtube.com/watch?v=AyygTVlAJbo) You are given a large integer represented as an integer array `digits`, where each `digits[i]` is the `ith` digit of the...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=hgyuMBpTNSY) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=hgyuMBpTNSY) [](https://www.youtube.com/watch?v=hgyuMBpTNSY) A valid number can be split up into these components (in order): 1. A decimal number or an integer. 2. (Optional)...