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=qt0LjRAAwpo) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=qt0LjRAAwpo) [](https://www.youtube.com/watch?v=qt0LjRAAwpo) Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=28h5eRYCA6A) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=28h5eRYCA6A) [](https://www.youtube.com/watch?v=28h5eRYCA6A) You are given an array of `k` linked-lists `lists`, each linked-list is sorted in ascending order. _Merge all the linked-lists into...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=1ntUk_h4GEo) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=1ntUk_h4GEo) [](https://www.youtube.com/watch?v=1ntUk_h4GEo) Given `n` pairs of parentheses, write a function to _generate all combinations of well-formed parentheses_. **Example 1:** **Input:** n = 3...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=u77vu-TKn0M) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=u77vu-TKn0M) [](https://www.youtube.com/watch?v=u77vu-TKn0M) You are given the heads of two sorted linked lists `list1` and `list2`. Merge the two lists into one **sorted** list....
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=kI-HyLvjDH8) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=kI-HyLvjDH8) [](https://www.youtube.com/watch?v=kI-HyLvjDH8) Given a string `s` containing just the characters `'('`, `')'`, `'{'`, `'}'`, `'['` and `']'`, determine if the input string is...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=Dei4CSAO0_A) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=Dei4CSAO0_A) [](https://www.youtube.com/watch?v=Dei4CSAO0_A) Given the `head` of a linked list, remove the `nth` node from the end of the list and return its head....
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=g87mM5FJYqw) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=g87mM5FJYqw) [](https://www.youtube.com/watch?v=g87mM5FJYqw) Given an array `nums` of `n` integers, return _an array of all the **unique** quadruplets_ `[nums[a], nums[b], nums[c], nums[d]]` such that:...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=g87mM5FJYqw) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=g87mM5FJYqw) [](https://www.youtube.com/watch?v=g87mM5FJYqw) Given a string containing digits from `2-9` inclusive, return all possible letter combinations that the number could represent. Return the answer...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=7zcryrgF9RU) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=7zcryrgF9RU) [](https://www.youtube.com/watch?v=7zcryrgF9RU) Given an integer array nums, return all the triplets `[nums[i], nums[j], nums[k]]` such that `i != j`, `i != k`, and...
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=-71F9EFodlY) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=-71F9EFodlY) [](https://www.youtube.com/watch?v=-71F9EFodlY) Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix,...