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=AY48Tj5z_fw) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=AY48Tj5z_fw) [](https://www.youtube.com/watch?v=AY48Tj5z_fw) Given a string containing just the characters `'('` and `')'`, return _the length of the longest valid (well-formed) parentheses_ _substring_. **Example...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=CjizdDIAy_4) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=CjizdDIAy_4) [](https://www.youtube.com/watch?v=CjizdDIAy_4) A **permutation** of an array of integers is an arrangement of its members into a sequence or linear order. * For...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=LQq7PXgK-XA) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=LQq7PXgK-XA) [](https://www.youtube.com/watch?v=LQq7PXgK-XA) You are given a string `s` and an array of strings `words`. All the strings of `words` are of **the same...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=6YPfJg385ws) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=6YPfJg385ws) [](https://www.youtube.com/watch?v=6YPfJg385ws) Given two integers `dividend` and `divisor`, divide two integers **without** using multiplication, division, and mod operator. The integer division should truncate...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=TqPEz-wKxEU) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=TqPEz-wKxEU) [](https://www.youtube.com/watch?v=TqPEz-wKxEU) Given two strings `needle` and `haystack`, return the index of the first occurrence of `needle` in `haystack`, or `-1` if `needle`...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=3Ht2xN7KHLA) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=3Ht2xN7KHLA) [](https://www.youtube.com/watch?v=3Ht2xN7KHLA) Given an integer array `nums` and an integer `val`, remove all occurrences of `val` in `nums` [**in-place**](https://en.wikipedia.org/wiki/In-place_algorithm). The order of the...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=QbRCOLpG-TM) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=QbRCOLpG-TM) [](https://www.youtube.com/watch?v=QbRCOLpG-TM) Given an integer array `nums` sorted in **non-decreasing order** , remove the duplicates [**in-place**](https://en.wikipedia.org/wiki/In-place_algorithm) such that each unique element appears only...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=XlJ0Xc1z3vY) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=XlJ0Xc1z3vY) [](https://www.youtube.com/watch?v=XlJ0Xc1z3vY) Given the `head` of a linked list, reverse the nodes of the list `k` at a time, and return _the modified...