JC
关于
技能
刷题
博客
联系
力扣刷题记录
LeetCode 热题 100
用我自己的方式解每一道题,记录思路、代码与复杂度分析。
已完成题目
全部
简单
中等
困难
001
两数之和
Two Sum
简单
002
字母异位词分组
Group Anagrams
中等
003
最长连续序列
Longest Consecutive Sequence
中等
004
移动零
Move Zeroes
简单
005
盛最多水的容器
Container With Most Water
中等
006
三数之和
3Sum
中等
007
接雨水
Trapping Rain Water
困难
008
无重复字符的最长子串
Longest Substring Without Repeating Characters
中等
009
找到字符串中所有字母异位词
Find All Anagrams in a String
中等
010
和为 K 的子数组
Subarray Sum Equals K
中等
011
滑动窗口最大值
Sliding Window Maximum
困难
012
最小覆盖子串
Minimum Window Substring
困难
013
最大子数组和
Maximum Subarray
中等
014
合并区间
Merge Intervals
中等
015
轮转数组
Rotate Array
中等
016
除了自身以外数组的乘积
Product of Array Except Self
中等
017
缺失的第一个正数
First Missing Positive
困难
018
矩阵置零
Set Matrix Zeroes
中等
019
螺旋矩阵
Spiral Matrix
中等
020
旋转图像
Rotate Image
中等
021
搜索二维矩阵 II
Search a 2D Matrix II
中等
022
相交链表
Intersection of Two Linked Lists
简单
023
反转链表
Reverse Linked List
简单
024
回文链表
Palindrome Linked List
简单
025
环形链表
Linked List Cycle
简单
026
环形链表 II
Linked List Cycle II
中等
027
合并两个有序链表
Merge Two Sorted Lists
简单
028
两数相加
Add Two Numbers
中等
029
删除链表的倒数第 N 个结点
Remove Nth Node From End of List
中等
030
两两交换链表中的节点
Swap Nodes in Pairs
中等
031
K 个一组翻转链表
Reverse Nodes in k-Group
困难
032
随机链表的复制
Copy List with Random Pointer
中等
033
排序链表
Sort List
中等
034
合并 K 个升序链表
Merge k Sorted Lists
困难
035
LRU 缓存
LRU Cache
中等
036
二叉树的中序遍历
Binary Tree Inorder Traversal
简单
037
二叉树的最大深度
Maximum Depth of Binary Tree
简单
038
翻转二叉树
Invert Binary Tree
简单
039
对称二叉树
Symmetric Tree
简单
040
二叉树的直径
Diameter of Binary Tree
简单
041
二叉树的层序遍历
Binary Tree Level Order Traversal
中等
042
将有序数组转换为二叉搜索树
Convert Sorted Array to Binary Search Tree
简单
043
验证二叉搜索树
Validate Binary Search Tree
中等
044
二叉搜索树中第 K 小的元素
Kth Smallest Element in a BST
中等
045
二叉树的右视图
Binary Tree Right Side View
中等
046
二叉树展开为链表
Flatten Binary Tree to Linked List
中等
047
从前序与中序遍历序列构造二叉树
Construct Binary Tree from Preorder and Inorder Traversal
中等
048
路径总和 III
Path Sum III
中等
049
二叉树的最近公共祖先
Lowest Common Ancestor of a Binary Tree
中等
050
二叉树中的最大路径和
Binary Tree Maximum Path Sum
困难
051
岛屿数量
Number of Islands
中等
052
腐烂的橘子
Rotting Oranges
中等
053
课程表
Course Schedule
中等
054
实现 Trie (前缀树)
Implement Trie (Prefix Tree)
中等
055
全排列
Permutations
中等
056
子集
Subsets
中等
057
电话号码的字母组合
Letter Combinations of a Phone Number
中等
058
组合总和
Combination Sum
中等
059
括号生成
Generate Parentheses
中等
060
单词搜索
Word Search
中等
061
分割回文串
Palindrome Partitioning
中等
062
N 皇后
N-Queens
困难
063
搜索插入位置
Search Insert Position
简单
064
搜索二维矩阵
Search a 2D Matrix
中等
065
在排序数组中查找元素的第一个和最后一个位置
Find First and Last Position of Element in Sorted Array
中等
066
搜索旋转排序数组
Search in Rotated Sorted Array
中等
067
寻找旋转排序数组中的最小值
Find Minimum in Rotated Sorted Array
中等
068
寻找两个正序数组的中位数
Median of Two Sorted Arrays
困难
069
有效的括号
Valid Parentheses
简单
070
最小栈
Min Stack
中等
071
字符串解码
Decode String
中等
072
每日温度
Daily Temperatures
中等
073
柱状图中最大的矩形
Largest Rectangle in Histogram
困难
074
数组中的第K个最大元素
Kth Largest Element in an Array
中等
075
前 K 个高频元素
Top K Frequent Elements
中等
076
数据流的中位数
Find Median from Data Stream
困难
077
买卖股票的最佳时机
Best Time to Buy and Sell Stock
简单
078
跳跃游戏
Jump Game
中等
079
跳跃游戏 II
Jump Game II
中等
080
划分字母区间
Partition Labels
中等
081
爬楼梯
Climbing Stairs
简单
082
杨辉三角
Pascal's Triangle
简单
083
打家劫舍
House Robber
中等
084
完全平方数
Perfect Squares
中等
085
零钱兑换
Coin Change
中等
086
单词拆分
Word Break
中等
087
最长递增子序列
Longest Increasing Subsequence
中等
088
乘积最大子数组
Maximum Product Subarray
中等
089
分割等和子集
Partition Equal Subset Sum
中等
090
最长有效括号
Longest Valid Parentheses
困难
091
不同路径
Unique Paths
中等
092
最小路径和
Minimum Path Sum
中等
093
最长回文子串
Longest Palindromic Substring
中等
094
最长公共子序列
Longest Common Subsequence
中等
095
编辑距离
Edit Distance
中等
096
只出现一次的数字
Single Number
简单
097
多数元素
Majority Element
简单
098
颜色分类
Sort Colors
中等
099
下一个排列
Next Permutation
中等
100
寻找重复数
Find the Duplicate Number
中等
没有匹配的题目。