Skip to content

himichael/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Number Title C C++ Java Python Go Solution Difficulty
0001 Two Sum (两数之和) c c++ java python go my_solution Easy
0002 Add Two Numbers(两数相加) c c++ java python go my_solution Medium
0003 Longest Substring Without Repeating Characters(无重复字符的最长子串) c c++ java python go my_solution Medium
0004 Median of Two Sorted Arrays(寻找两个有序数组的中位数) c c++ java python go Hard
0005 Longest Palindromic Substring(最长回文子串) c c++ java python go Medium
0006 ZigZag Conversion(Z字形变换) c c++ java python go my_solution Medium
0007 Reverse Integer(整数翻转) c c++ java python go my_solution Easy
0008 String to Integer (atoi)(字符串转换整数 atoi) c c++ java python go my_solution Medium
0009 Palindrome Number(回文数) c c++ java python go my_solution Easy
0010 Regular Expression Matching(正则表达式匹配) c c++ java python go Hard
0011 Container With Most Water(盛最多水的容器) c c++ java python go my_solution Medium
0012 Integer to Roman(整数转罗马数字) c c++ java python go Medium
0013 Roman to Integer(罗马数字转整数) c c++ java python go my_solution Easy
0014 Longest Common Prefix(最长公共前缀) c c++ java python go Easy
0015 3Sum(三数之和) c c++ java python go my_solution Medium
0016 3Sum Closest(最接近的三数之和) c c++ java python go Medium
0017 Letter Combinations of a Phone Number(电话号码的字母组合) c c++ java python go my_solution Medium
0018 4sum(四数之和) c c++ java python go Medium
0019 Remove Nth Node From End of List(删除链表的倒数第N个节点) c c++ java python go my_solution Medium
0020 Valid Parentheses(有效的括号) c c++ java python go my_solution Easy
0021 Merge Two Sorted Lists(合并两个有序链表) c c++ java python go my_solution Easy
0022 Generate Parentheses(生成括号) c c++ java python go my_solution Medium
0023 Merge k Sorted Lists(合并k个排序链表) c c++ java python go my_solution Hard
0024 Swap Nodes in Pairs(两两交换链表中的节点) c c++ java python go my_solution Medium
0025 Reverse Nodes in k-Group(k个一组翻转链表) c c++ java python go my_solution Hard
0026 Remove Duplicates from Sorted Array(删除排序数组中的重复项) c c++ java python go Easy
0027 Basic Calculator II(基本计算器 II) c c++ java python go Medium
0027 Remove Element(移除元素) c c++ java python go Easy
0028 Implement strStr()(实现strStr) c c++ java python go Easy
0029 Divide Two Integers(两数相除) c c++ java python go Medium
0030 Substring with Concatenation of All Words(串联所有单词的子串) c c++ java python go my_solution Hard
0031 Next Permutation(下一个排列) c c++ java python go Medium
0032 Longest Valid Parentheses(最长有效括号) c c++ java python go Hard
0033 Search in Rotated Sorted Array(搜索旋转排序数组) c c++ java python go my_solution Medium
0034 Find First and Last Position of Element in Sorted Array(在排序数组中查找元素的第一个和最后一个位置) c c++ java python go my_solution Medium
0035 Search Insert Position(搜索插入位置) c c++ java python go my_solution Easy
0036 Valid Sudoku(有效的数独) c c++ java python go Medium
0037 Sudoku Solver(解数独) c c++ java python go Hard
0038 Count and Say(外观数列) c c++ java python go Easy
0039 Combination Sum(组合总和) c c++ java python go Medium
0040 Combination Sum II(组合总和2) c c++ java python go Medium
0041 First Missing Positive(缺失的第一个正数) c c++ java python go Hard
0042 trapping-rain-water(接雨水) c c++ java python go Hard
0043 Multiply Strings(字符串相乘) c c++ java python go Medium
0044 Wildcard Matching(通配符匹配) c c++ java python go Hard
0045 Jump Game II(跳跃游戏 II) c c++ java python go Hard
0046 Permutations(全排列) c c++ java python go Medium
0047 Permutations II(全排列2) c c++ java python go Medium
0048 Rotate Image(旋转图像) c c++ java python go Medium
0049 group-anagrams(字母异位词分组) c c++ java python go Medium
0050 Pow(x, n) c c++ java python go Medium
0051 N-Queens(N皇后) c c++ java python go Hard
0052 N-Queens II(N皇后 II) c c++ java python go Hard
0053 Maximum Subarray(最大子序和) c c++ java python go Easy
0054 Spiral Matrix(螺旋矩阵) c c++ java python go Medium
0055 Jump Game(跳跃游戏) c c++ java python go my_solution Medium
0056 Merge Intervals(合并区间) c c++ java python go my_solution Medium
0057 Insert Interval(插入区间) c c++ java python go Hard
0058 Length of Last Word(最后一个单词的长度) c c++ java python go Easy
0059 Spiral Matrix II(螺旋矩阵 II) c c++ java python go Medium
0060 Permutation Sequence(第k个排列) c c++ java python go Hard
0061 Rotate List(旋转链表) c c++ java python go my_solution Medium
0062 Unique Paths(不同路径) c c++ java python go Medium
0063 Unique Paths II(不同路径 II) c c++ java python go Medium
0064 Minimum Path Sum(最小路径和) c c++ java python go Medium
0065 Valid Number(有效数字) c c++ java python go Hard
0066 Plus One(加一) c c++ java python go Easy
0067 Add Binary(二进制求和) c c++ java python go Easy
0068 Text Justification(文本左右对齐) c c++ java python go Hard
0069 Sqrt(x)(x的平方根) c c++ java python go Easy
0070 Climbing_Stairs(爬楼梯) c c++ java python go Easy
0071 Simplify Path(简化路径) c c++ java python go Medium
0072 Edit Distance(编辑距离) c c++ java python go Hard
0074 Search a 2D Matrix(搜索二维矩阵) c c++ java python go Medium
0075 Sort Colors(颜色分类) c c++ java python go my_solution Medium
0076 Minimum Window Substring(最小覆盖子串) c c++ java python go Hard
0077 combinations(组合) c c++ java python go Medium
0078 subsets(子集) c c++ java python go Medium
0079 Word Search(单词搜索) c c++ java python go Medium
0081 Search in Rotated Sorted Array II(搜索旋转排序数组 II) c c++ java python go Medium
0082 Remove Duplicates from Sorted List II(删除链表中的重复元素II) c c++ java python go my_solution Medium
0083 Remove Duplicates from Sorted List(删除链表中的重复元素) c c++ java python go my_solution Easy
0084 Largest Rectangle in Histogram(柱状图中最大的矩形) c c++ java python go Hard
0085 Maximal Rectangle(最大矩形) c c++ java python go Hard
0086 Partition List(分割链表) c c++ java python go Medium
0087 Scramble String(扰乱字符串) c c++ java python go Hard
0088 Merge Sorted Array(合并两个有序数组) c c++ java python go my_solution Easy
0090 Subsets II(子集 II) c c++ java python go Medium
0091 Decode Ways(解码方法) c c++ java python go Medium
0092 Reverse Linked List II(反转链表 II) c c++ java python go Medium
0093 Restore IP Addresses(复原IP地址) c c++ java python go Medium
0094 Binary Tree Inorder Traversal(二叉树的中序遍历) c c++ java python go my_solution Medium
0095 Unique Binary Search Trees II(不同的二叉搜索树 II) c c++ java python go Medium
0096 Unique Binary Search Trees(不同的二叉搜索树) c c++ java python go Medium
0097 Interleaving String(交错字符串) c c++ java python go Hard
0098 Validate Binary Search Tree(验证二叉搜索树) c c++ java python go Medium
0099 Recover Binary Search Tree(恢复二叉搜索树) c c++ java python go my_solution Hard
0100 Same Tree(相同的树) c c++ java python go my_solution Easy
0101 Symmetric Tree(对称二叉树) c c++ java python go my_solution Easy
0102 Binary Tree Level Order Traversal(二叉树的层次遍历) c c++ java python go my_solution Medium
0103 Binary Tree Zigzag Level Order Traversal(二叉树的锯齿形层次遍历) c c++ java python go Medium
0104 maximum-depth-of-binary-tree(二叉树的最大深度) c c++ java python go my_solution Easy
0105 Construct Binary Tree from Preorder and Inorder Traversal(从前序与中序遍历序列构造二叉树) c c++ java python go my_solution Medium
0106 Construct Binary Tree from Inorder and Postorder Traversal(从中序与后序遍历序列构造二叉树) c c++ java python go Medium
0107 Binary Tree Level Order Traversal II(二叉树的层次遍历 II) c c++ java python go Easy
0108 convert-sorted-array-to-binary-search-tree(将有序数组转换为二叉搜索树) c c++ java python go Easy
0109 convert-sorted-list-to-binary-search-tree(有序链表转换二叉搜索树) c c++ java python go Medium
0110 Balanced Binary Tree(平衡二叉树) c c++ java python go Easy
0111 minimum-depth-of-binary-tree(二叉树的最小深度) c c++ java python go Easy
0112 Path Sum(路径总和) c c++ java python go Easy
0113 Path Sum II(路径总和 II) c c++ java python go Medium
0114 Flatten Binary Tree to Linked List(二叉树展开为链表) c c++ java python go my_solution Medium
0116 Populating Next Right Pointers in Each Node(填充每个节点的下一个右侧节点指针) c c++ java python go my_solution Medium
0117 Populating Next Right Pointers in Each Node II(填充每个节点的下一个右侧节点指针 II) c c++ java python go Medium
0118 Pascal's Triangle(杨辉三角) c c++ java python go Easy
0119 Pascal's Triangle II(杨辉三角) c c++ java python go Easy
0120 Triangle(三角形最小路劲和) c c++ java python go Medium
0121 Best Time to Buy and Sell Stock(买卖股票的最佳时机) c c++ java python go Easy
0122 Best Time to Buy and Sell Stock II(买卖股票的最佳时机 II) c c++ java python go Easy
0123 Best Time to Buy and Sell Stock III(买卖股票的最佳时机 III) c c++ java python go Hard
0124 Binary Tree Maximum Path Sum(二叉树中的最大路径和) c c++ java python go Hard
0125 Valid Palindrome(验证回文串) c c++ java python go Easy
0126 Word Ladder II(单词接龙 II) c c++ java python go Hard
0127 Word Ladder(单词接龙) c c++ java python go Medium
0128 Longest Consecutive Sequence(最长连续序列) c c++ java python go Hard
0129 Sum Root to Leaf Numbers(求根到叶子节点数字之和) c c++ java python go Medium
0130 Surrounded Regions(被围绕的区域) c c++ java python go Medium
0131 Palindrome Partitioning(分割回文串) c c++ java python go Medium
0132 Palindrome Partitioning II(分割回文串II) c c++ java python go Hard
0133 Clone Graph(克隆图) c c++ java python go Medium
0134 Gas Station(加油站) c c++ java python go Medium
0135 Candy(分发糖果) c c++ java python go ) Hard
0136 Single_Number(只出现一次的数字) c c++ java python go my_solution Easy
0137 Single Number II(只出现一次的数字 II) c c++ java python go ) Medium
0138 Copy List with Random Pointer(复制带随机指针的链表) c c++ java python go my_solution Medium
0139 Word Break(单词拆分) c c++ java python go Medium
0140 Word Break II(单词拆分 II) c c++ java python go Hard
0141 Linked List Cycle(环形链表) c c++ java python go my_solution Easy
0142 Linked List Cycle II(环形链表 II) c c++ java python go Medium
0143 Reorder List(重排链表) c c++ java python go Medium
0144 Binary Tree Preorder Traversal(二叉树的前序遍历) c c++ java python go Medium
0145 Binary Tree Postorder Traversal(二叉树的后序遍历) c c++ java python go Medium
0146 LRU Cache(LRU缓存机制) c c++ java python go my_solution Medium
0147 Insertion Sort List(对链表进行插入排序) c c++ java python go Medium
0148 Sort List(排序链表) c c++ java python go Medium
0151 Reverse Words in a String(翻转字符串里的单词) c c++ java python go Medium
0152 Maximum Product Subarray(乘积最大子序列) c c++ java python go Medium
0153 Find Minimum in Rotated Sorted Array(寻找旋转排序数组中的最小值) c c++ java python go Medium
0155 Min Stack(最小栈) c c++ java python go Easy
0160 Intersection of Two Linked Lists(相交链表) c c++ java python go my_solution Easy
0162 Find Peak Element(寻找峰值) c c++ java python go Medium
0164 Maximum Gap(最大间距) c c++ java python go Hard
0167 Two Sum II - Input array is sorted(两数之和 II - 输入有序数组) c c++ java python go Easy
0169 Majority Element(求众数) c c++ java python go Easy
0173 Binary Search Tree Iterator(二叉搜索树迭代器) c c++ java python go Medium
0174 Dungeon Game(地下城游戏) c c++ java python go Hard
0175 combine-two-tables(组合两个表-SQL题目) sql c++ java python go Easy
0182 duplicate-emails(查找重复的电子邮箱-SQL题目) sql c++ java python go Easy
0187 Repeated DNA Sequences(重复的DNA序列) c c++ java python go Medium
0188 Best Time to Buy and Sell Stock IV(买卖股票的最佳时机 IV) c c++ java python go Hard
0191 Number of 1 Bits(位1的个数) c c++ java python go Easy
0195 Tenth Line(第十行-Shell题目) shell c++ java python go Easy
0198 House Robber(打家劫舍) c c++ java python go my_solution Easy
0199 Binary Tree Right Side View(二叉树的右视图) c c++ java python go Medium
0200 Number of Islands(岛屿数量) c c++ java python go Medium
0201 Bitwise AND of Numbers Range(数字范围按位与) c c++ java python go Medium
0202 Happy Number(快乐数) c c++ java python go Easy
0203 Remove Linked List Elements(移除链表元素) c c++ java python go my_solution Easy
0204 Count Primes(计算质数) c c++ java python go Easy
0205 Isomorphic Strings(同构字符串) c c++ java python go Easy
0206 Reverse Linked List(反转链表) c c++ java python go my_solution Easy
0207 Course Schedule(课程表) c c++ java python go Medium
0208 Implement Trie (Prefix Tree)(实现 Trie (前缀树)) c c++ java python go Medium
0209 Minimum Size Subarray Sum(长度最小的子数组) c c++ java python go Medium
0210 Course Schedule II(课程表 II) c c++ java python go Medium
0211 Add and Search Word - Data structure design(添加与搜索单词 - 数据结构设计) c c++ java python go Medium
0212 Word Search II(单词搜索 II) c c++ java python go Hard
0213 House Robber II(打家劫舍 II) c c++ java python go my_solution Medium
0214 Shortest Palindrome(最短回文串) c c++ java python go Hard
0215 Kth Largest Element in an Array(数组中的第K个最大元素) c c++ java python go Medium
0216 combination-sum-iii(组合总和3) c c++ java python go Medium
0217 Contains Duplicate(存在重复元素) c c++ java python go Easy
0219 Contains Duplicate II(存在重复元素 II) c c++ java python go Easy
0221 Maximal Square(最大正方形) c c++ java python go Medium
0222 Count Complete Tree Nodes(完全二叉树的节点个数) c c++ java python go Medium
0223 Rectangle Area(矩形面积) c c++ java python go Medium
0224 Basic Calculator(基本计算器) c c++ java python go Hard
0225 Implement Stack using Queues(用队列实现栈) c c++ java python go Easy
0226 Invert Binary Tree(翻转二叉树) c c++ java python go my_solution Easy
0230 Kth Smallest Element in a BST(二叉搜索树中第K小的元素) c c++ java python go Medium
0231 power-of-two(2的冥) c c++ java python go Easy
0232 Implement Queue using Stacks(用栈实现队列) c c++ java python go Easy
0234 Palindrome Linked List(回文链表) c c++ java python go my_solution Easy
0235 Lowest Common Ancestor of a Binary Search Tree(二叉搜索树的最近公共祖先) c c++ java python go Easy
0236 Lowest Common Ancestor of a Binary Tree(二叉树的最近公共祖先) c c++ java python go Medium
0237 Delete Node in a Linked List(删除链表中的节点) c c++ java python go my_solution Easy
0238 Product of Array Except Self(除自身以外数组的乘积) c c++ java python go Medium
0239 Sliding Window Maximum(滑动窗口最大值) c c++ java python go Hard
0240 Search a 2D Matrix II(搜索二维矩阵 II) c c++ java python go Medium
0242 Valid Anagram(有效的字母异位词) c c++ java python go Easy
0257 Binary Tree Paths(二叉树的所有路径) c c++ java python go Easy
0258 Add Digits(各位相加) c c++ java python go Easy
0263 Ugly Number(丑数) c c++ java python go Easy
0264 Ugly Number II(丑数 II) c c++ java python go Medium
0268 Missing Number(缺失数字) c c++ java python go Easy
0274 H-Index(H指数) c c++ java python go Medium
0275 H-Index II(H指数 II) c c++ java python go Medium
0278 First Bad Version(第一个错误的版本) c c++ java python go Easy
0279 Perfect Squares(完全平方数) c c++ java python go Medium
0283 Move Zeroes(移动零) c c++ java python go my_solution Easy
0284 Peeking Iterator(顶端迭代器) c c++ java python go Medium
0287 Find the Duplicate Number(寻找重复数) c c++ java python go Medium
0289 Game of Life(生命游戏) c c++ java python go Medium
0290 Word Pattern(单词规律) c c++ java python go Easy
0297 Serialize and Deserialize Binary Tree(二叉树的序列化与反序列化) c c++ java python go Hard
0300 Longest Increasing Subsequence(最长上升子序列) c c++ java python go my_solution Medium
0303 Range Sum Query - Immutable(区域和检索 - 数组不可变) c c++ java python go Easy
0304 Range Sum Query 2D - Immutable(二维区域和检索 - 矩阵不可变) c c++ java python go Medium
0309 Best Time to Buy and Sell Stock with Cooldown(最佳买卖股票时机含冷冻期) c c++ java python go Medium
0312 Burst Balloons(戳气球) c c++ java python go Hard
0315 Count of Smaller Numbers After Self(计算右侧小于当前元素的个数) c c++ java python go Hard
0316 Remove Duplicate Letters(去除重复字母) c c++ java python go Medium
0321 Create Maximum Number(拼接最大数) c c++ java python go Hard
0322 Coin Change(零钱兑换) c c++ java python go Medium
0326 Power of Three(3的幂) c c++ java python go Easy
0327 Count of Range Sum(区间和的个数) c c++ java python go Hard
0328 Odd Even Linked List(奇偶链表) c c++ java python go Medium
0329 Longest Increasing Path in a Matrix(矩阵中的最长递增路径) c c++ java python go Hard
0330 Patching Array(按要求补齐数组) c c++ java python go Hard
0331 Verify Preorder Serialization of a Binary Tree(验证二叉树的前序序列化) c c++ java python go Medium
0332 Reconstruct Itinerary(重新安排行程) c c++ java python go Medium
0336 Palindrome Pairs(回文对) c c++ java python go Hard
0337 House Robber III(打家劫舍 III) c c++ java python go my_solution Medium
0338 Counting Bits(比特位计数) c c++ java python go Medium
0341 Flatten Nested List Iterator c c++ java python go Medium
0342 Power of Four(4的幂) c c++ java python go Easy
0343 Integer Break(整数拆分) c c++ java python go Medium
0344 Reverse String(翻转字符串) c c++ java python go Easy
0345 Reverse Vowels of a String(反转字符串中的元音字母) c c++ java python go Easy
0347 Top K Frequent Elements(前 K 个高频元素) c c++ java python go Medium
0349 Intersection of Two Arrays(两个数组的交集) c c++ java python go Easy
0354 Russian Doll Envelopes(俄罗斯套娃信封问题) c c++ java python go Hard
0350 Intersection of Two Arrays II(两个数组的交集 II) c c++ java python go Easy
0355 Design Twitter(设计推特) c c++ java python go Medium
0365 Water and Jug Problem(水壶问题) c c++ java python go Medium
0367 Valid Perfect Square(有效的完全平方数) c c++ java python go Easy
0374 Guess Number Higher or Lower(猜数字大小) c c++ java python go Easy
0376 Wiggle Subsequence(摆动序列) c c++ java python go Medium
0377 combination-sum-iv(组合总和 4) c c++ java python go Mediumm
0378 Kth Smallest Element in a Sorted Matrix(有序矩阵中第K小的元素) c c++ java python go Mediumm
0380 Insert Delete GetRandom O(1)(常数时间插入、删除和获取随机元素) c c++ java python go Medium
0381 Insert Delete GetRandom O(1) - Duplicates allowed(O(1) 时间插入、删除和获取随机元素 - 允许重复) c c++ java python go Hard
0383 Ransom Note(赎金信) c c++ java python go Easy
0387 First Unique Character in a String(字符串中的第一个唯一字符) c c++ java python go Easy
0389 Find the Difference(找不同) c c++ java python go Easy
0392 Is Subsequence(判断子序列) c c++ java python go Easy
0394 Decode String(字符串解码) c c++ java python go Medium
0398 Random Pick Index(随机数索引) c c++ java python go Medium
0402 Remove K Digits(移掉K位数字) c c++ java python go Medium
0403 Frog Jump(青蛙过河) c c++ java python go Hard
0404 Sum of Left Leaves(左叶子之和) c c++ java python go Easy
0406 Queue Reconstruction by Height(根据身高重建队列) c c++ java python go Medium
0409 Longest Palindromes(最长回文串) c c++ java python go Easy
0410 Split Array Largest Sum(分割数组的最大值) c c++ java python go Hard
0412 Fizz Buzz c c++ java python go Easy
0414 Third Maximum Number(第三大的数) c c++ java python go Easy
0415 Add Strings(字符串相加) c c++ java python go Easy
0416 Partition Equal Subset Sum(分割等和子集) c c++ java python go Medium
0424 Longest Repeating Character Replacement(替换后的最长重复字符) c c++ java python go Medium
0429 N-ary Tree Level Order Traversal(N叉树的层序遍历) c c++ java python go Medium
0430 N-ary Tree Level Order Traversal(扁平化多级双向链表) c c++ java python go Medium
0435 Non-overlapping Intervals(无重叠区间) c c++ java python go Medium
0436 Find Right Interval(寻找右区间) c c++ java python go Medium
0437 Path Sum III(路径总和 III) c c++ java python go Medium
0438 Find All Anagrams in a String(找到字符串中所有字母异位词) c c++ java python go Medium
0441 Arranging Coins(排列硬币) c c++ java python go Easy
0443 String Compression(压缩字符串) c c++ java python go Medium
0445 Add Two Numbers II(两数相加 II) c c++ java python go Medium
0448 Find All Numbers Disappeared in an Array(找到所有数组中消失的数字) c c++ java python go my_solution Easy
0449 Serialize and Deserialize BST(序列化和反序列化二叉搜索树) c c++ java python go Medium
0450 Delete Node in a BST(删除二叉搜索树中的节点) c c++ java python go Medium
0451 Sort Characters By Frequency(根据字符出现频率排序) c c++ java python go Medium
0452 Minimum Number of Arrows to Burst Balloons(用最少数量的箭引爆气球) c c++ java python go Medium
0454 4Sum II(四数相加 II) c c++ java python go Easy
0455 Assign Cookies(分发饼干) c c++ java python go Medium
0459 Repeated Substring Pattern(重复的子字符串) c c++ java python go Easy
0460 LFU Cache(LFU缓存) c c++ java python go my_solution Hard
0461 Hamming Distance(汉明距离) c c++ java python go Easy
0463 Island Perimeter(岛屿的周长) c c++ java python go Easy
0466 Count The Repetitions(统计重复个数) c c++ java python go Hard
0472 Concatenated Words(连接词) c c++ java python go Hard
0473 Matchsticks to Square(火柴拼正方形) c c++ java python go Medium
0474 Ones and Zeroes(一和零) c c++ java python go Medium
0475 Heaters(供暖器) c c++ java python go Medium
0485 Max Consecutive Ones(最大连续1的个数) c c++ java python go Easy
0486 Predict the Winner(预测赢家) c c++ java python go Medium
0491 Increasing Subsequences(递增子序列) c c++ java python go Medium
0493 Reverse Pairs(翻转对) c c++ java python go Hard
0494 Target Sum(目标和) c c++ java python go
0497 Random Point in Non-overlapping Rectangles(非重叠矩形中的随机点) c c++ java python go Medium
0501 Find Mode in Binary Search Tree(二叉搜索树中的众数) c c++ java python go Easy
0508 Most Frequent Subtree Sum(出现次数最多的子树元素和) c c++ java python go Medium
0509 Fibonacci_Number(斐波那契数) c c++ java python go Easy
0513 Find Bottom Left Tree Value(找树左下角的值) c c++ java python go Medium
0514 Freedom Trail(自由之路) c c++ java python go Hard
0515 Find Largest Value in Each Tree Row(在每个树行中找最大值) c c++ java python go Medium
0516 Longest Palindromic Subsequence(最长回文子序列) c c++ java python go Medium
0518 Coin Change 2(零钱兑换 II) c c++ java python go Medium
0528 Random Pick with Weight(按权重随机选择) c c++ java python go Medium
0529 Minesweeper(扫雷游戏) c c++ java python go Medium
0530 Minimum Absolute Difference in BST(二叉搜索树的最小绝对差) c c++ java python go Easy
0535 Encode_and_Decode_TinyURL(短URL的加密和解密) c c++ java python go Medium
0538 Convert BST to Greater Tree(把二叉搜索树转换为累加树) c c++ java python go Medium
0542 01 Matrix(01 矩阵) c c++ java python go Medium
0543 Diameter of Binary Tree(二叉树的直径) c c++ java python go Easy
0546 Remove Boxes(移除盒子) c c++ java python go Hard
0547 Friend Circles(朋友圈) c c++ java python go Medium
0551 student-attendance-record-i(学生出勤记录1) c c++ java python go Easy
0557 Reverse Words in a String III(反转字符串中的单词 III) c c++ java python go Easy
0559 maximum-depth-of-n-ary-tree(N叉树的最大深度) c c++ java python go Easy
0560 Subarray Sum Equals K(和为K的子数组) c c++ java python go Medium
0563 Binary Tree Tilt(二叉树的坡度) c c++ java python go Easy
0567 Permutation in String(字符串的排列) c c++ java python go Medium
0572 Subtree of Another Tree(另一个树的子树) c c++ java python go Easy
0589 N-ary Tree Preorder Traversal(N叉树的前序遍历) c c++ java python go Easy
0590 N-ary Tree Postorder Traversal(N叉树的后序遍历) c c++ java python go Easy
0595 big-countries(大的国家SQL题目) sql c++ java python go Easy
0606 Construct String from Binary Tree(根据二叉树创建字符串) c c++ java python go Easy
0617 merge-two-binary-trees(合并二叉树) c c++ java python go my_solution Easy
0620 not-boring-movies(有趣的电影-SQL题目) sql c++ java python go Easy
0621 Task Scheduler(任务调度器) c c++ java python go Medium
0623 Add One Row to Tree(在二叉树中增加一行) c c++ java python go Medium
0627 swap-salary(交换工资-SQL题目) sql c++ java python go Easy
0632 Smallest Range Covering Elements from K Lists(最小区间) c c++ java python go Hard
0637 Average of Levels in Binary Tree(二叉树的层平均值) c c++ java python go Easy
0639 Decode Ways II(解码方法 II) c c++ java python go Hard
0647 Palindromic Substrings(回文子串) c c++ java python go Medium
0649 Dota2 Senate(Dota2 参议院) c c++ java python go Medium
0653 Two Sum IV - Input is a BST(两数之和 IV - 输入 BST) c c++ java python go Easy
0654 maximum-binary-tree(最大二叉树) c c++ java python go Medium
0655 Print Binary Tree(输出二叉树) c c++ java python go Medium
0657 Robot Return to Origin(机器人能否返回原点) c c++ java python go Easy
0658 Find K Closest Elements(找到 K 个最接近的元素) c c++ java python go Medium
0662 Maximum Width of Binary Tree(二叉树最大宽度) c c++ java python go Medium
0669 Trim a Binary Search Tree(修剪二叉搜索树) c c++ java python go Medium
0671 Second Minimum Node In a Binary Tree(二叉树中第二小的节点) c c++ java python go Easy
0677 Map Sum Pairs(键值映射) c c++ java python go Medium
0679 24 Game(24 点游戏) c c++ java python go Hard
0680 Valid Palindrome II(验证回文字符串 Ⅱ) c c++ java python go Easy
0684 Redundant Connection(冗余连接)(冗余连接) c c++ java python go Medium
0685 redundant-connection-ii(冗余连接 Ⅱ) c c++ java python go Hard
0687 Longest Univalue Path(最长同值路径) c c++ java python go Medium
0693 Binary Number with Alternating Bits(交替位二进制数) c c++ java python go Easy
0695 Max Area of Island(岛屿的最大面积) c c++ java python go Medium
0696 Count Binary Substrings(计数二进制子串) c c++ java python go Easy
0700 Search in a Binary Search Tree(二叉搜索树中的搜索) c c++ java python go Easy
0701 Insert into a Binary Search Tree(二叉搜索树中的插入操作) c c++ java python go Medium
0704 Binary Search(二分查找) c c++ java python go Easy
0707 Design Linked List(设计链表) c c++ java python go Medium
0709 To Lower Case(转换成小写字母) c c++ java python go Easy
0714 Best Time to Buy and Sell Stock with Transaction Fee(买卖股票的最佳时机含手续费) c c++ java python go Medium
0718 Maximum Length of Repeated Subarray(最长重复子数组) c c++ java python go Medium
0721 Accounts Merge(账户合并) c c++ java python go Medium
0725 Split Linked List in Parts(分隔链表) c c++ java python go Medium
0733 Flood Fill(图像渲染) c c++ java python go Easy
0738 Monotone Increasing Digits(单调递增的数字) c c++ java python go Medium
0739 Daily Temperatures(每日温度) c c++ java python go Medium
0741 Cherry Pickup(摘樱桃) c c++ java python go Hard
0744 Find Smallest Letter Greater Than Target(寻找比目标字母大的最小字母) c c++ java python go Easy
0746 Min Cost Climbing Stairs(使用最小花费爬楼梯) c c++ java python go Easy
0763 Partition Labels(划分字母区间) c c++ java python go Medium
0765 Couples Holding Hands(情侣牵手) c c++ java python go Hard
0767 Reorganize String(重构字符串) c c++ java python go Medium
0771 Jewels and Stones(宝石和石头) c c++ java python go Easy
0783 Minimum Distance Between BST Nodes(二叉搜索树节点最小距离) c c++ java python go Easy
0784 letter-case-permutation(字母大小写全排列) c c++ java python go Medium
0785 Is Graph Bipartite?(判断二分图) c c++ java python go Medium
0792 Number of Matching Subsequences(匹配子序列的单词数) c c++ java python go Medium
0807 Max Increase to Keep City Skyline(保持城市天际线) c c++ java python go Medium
0814 Binary Tree Pruning(二叉树剪枝) c c++ java python go Medium
0820 Short Encoding of Words(单词的压缩编码) c c++ java python go Medium
0832 Flipping an Image(翻转图像) c c++ java python go Easy
0834 Sum of Distances in Tree(树中距离之和) c c++ java python go Hard
0836 Rectangle Overlap(矩形重叠) c c++ java python go Easy
0837 New 21 Game(新21点) c c++ java python go Medium
0841 Keys and Rooms(新21点) c c++ java python go Medium
0842 Split Array into Fibonacci Sequence(将数组拆分成斐波那契序列) c c++ java python go Medium
0844 Backspace String Compare(比较含退格的字符串) c c++ java python go Easy
0845 Longest Mountain in Array(数组中的最长山脉) c c++ java python go Medium
0852 Peak Index in a Mountain Array(山脉数组的峰顶索引) c c++ java python go Easy
0860 Lemonade Change(柠檬水找零) c c++ java python go Easy
0861 Score After Flipping Matrix(翻转矩阵后的得分) c c++ java python go Medium
0862 Shortest Subarray with Sum at Least K(和至少为 K 的最短子数组) c c++ java python go Hard
0863 All Nodes Distance K in Binary Tree(二叉树中所有距离为 K 的结点) c c++ java python go Medium
0865 Smallest Subtree with all the Deepest Nodes(具有所有最深节点的最小子树) c c++ java python go Medium
0875 Koko Eating Bananas(爱吃香蕉的珂珂) c c++ java python go Medium
0876 Middle of the Linked List(链表的中间结点) c c++ java python go my_solution Easy
0884 Uncommon Words from Two Sentences(两句话中的不常见单词) c c++ java python go my_solution Easy
0887 Super Egg Drop(鸡蛋掉落) c c++ java python go Hard
0889 Construct Binary Tree from Preorder and Postorder Traversal(根据前序和后序遍历构造二叉树) c c++ java python go my_solution Medium
0892 Surface Area of 3D Shapes(三维形体的表面积) c c++ java python go Easy
0894 All Possible Full Binary Trees(所有可能的满二叉树) c c++ java python go Medium
0912 Sort an Array(排序数组) c c++ java python go Medium
0914 X of a Kind in a Deck of Cards(卡牌分组) c c++ java python go Easy
0917 Reverse Only Letters(仅仅反转字母) c c++ java python go Easy
0922 Sort Array By Parity II(按奇偶排序数组 II) c c++ java python go Easy
0931 Minimum Falling Path Sum(下降路径最小和) c c++ java python go Medium
0938 Range Sum of BST(二叉搜索树的范围和) c c++ java python go Easy
0941 Valid Mountain Array(有效的山脉数组) c c++ java python go Easy
0945 Minimum Increment to Make Array Unique(使数组唯一的最小增量) c c++ java python go Medium
0951 Flip Equivalent Binary Trees(翻转等价二叉树) c c++ java python go Medium
0952 Long Pressed Name(长按键入) c c++ java python go Easy
0958 Check Completeness of a Binary Tree(二叉树的完全性检验) c c++ java python go Medium
0968 Binary Tree Cameras(监控二叉树) c c++ java python go Hard
0971 Flip Binary Tree To Match Preorder Traversal(翻转二叉树以匹配先序遍历) c c++ java python go Medium
0973 K Closest Points to Origin(最接近原点的 K 个点) c c++ java python go Medium
0974 Subarray Sums Divisible by K(和可被 K 整除的子数组) c c++ java python go Medium
0976 Largest Perimeter Triangle(三角形的最大周长) c c++ java python go Easy
0977 Squares of a Sorted Array(有序的平方数组) c c++ java python go Easy
0979 Distribute Coins in Binary Tree(在二叉树中分配硬币) c c++ java python go Medium
0983 Minimum Cost For Tickets(最低票价) c c++ java python go Medium
0987 Vertical Order Traversal of a Binary Tree(二叉树的垂序遍历) c c++ java python go Medium
0990 Satisfiability of Equality Equations(等式方程的可满足性) c c++ java python go Medium
0993 Cousins in Binary Tree(二叉树的堂兄弟节点) c c++ java python go Easy
0994 Rotting Oranges(腐烂的橘子) c c++ java python go Medium
0995 Minimum Number of K Consecutive Bit Flips(车的可用捕获量) c c++ java python go Hard
0999 Available Captures for Rook(车的可用捕获量) c c++ java python go Easy
1002 Find Common Characters(查找常用字符) c c++ java python go Easy
1004 Max Consecutive Ones III(最大连续1的个数 III) c c++ java python go Medium
1013 Partition Array Into Three Parts With Equal Sum(将数组分成和相等的三个部分) c c++ java python go Easy
1014 Best Sightseeing Pair(最佳观光组合) c c++ java python go Medium
1019 Next Greater Node In Linked List(链表中的下一个更大节点) c c++ java python go Medium
1008 Construct Binary Search Tree from Preorder Traversal(先序遍历构造二叉树) c c++ java python go Medium
1021 Remove Outermost Parentheses(删除最外层的括号) c c++ java python go Easy
1024 Video Stitching(视频拼接) c c++ java python go Medium
1025 Divisor Game(除数博弈) c c++ java python go Easy
1028 Recover a Tree From Preorder Traversal(从先序遍历还原二叉树) c c++ java python go Hard
1030 Matrix Cells in Distance Order(距离顺序排列矩阵单元格) c c++ java python go Easy
1046 Last Stone Weight(字符串的最大公因子) c c++ java python go Easy
1071 Greatest Common Divisor of Strings(字符串的最大公因子) c c++ java python go Easy
1079 Letter Tile Possibilities(活字印刷) c c++ java python go Medium
1095 Find in Mountain Array(山脉数组中查找目标值) c c++ java python go Hard
1103 Distribute Candies to People(分糖果 II) c c++ java python go Easy
1104 Path In Zigzag Labelled Binary Tree(二叉树寻路) c c++ java python go Medium
1108 Defanging an IP Address(IP地址无效化) c c++ java python go Easy
1111 Maximum Nesting Depth of Two Valid Parentheses Strings(有效括号的嵌套深度) c c++ java python go Medium
1122 Relative Sort Array(数组的相对排序) c c++ java python go Easy
1123 Lowest Common Ancestor of Deepest Leaves(最深叶节点的最近公共祖先) c c++ java python go Medium
1143 Longest Common Subsequence(最长公共子序列) c c++ java python go Medium
1160 Find Words That Can Be Formed by Characters(拼写单词) c c++ java python go Easy
1162 As Far from Land as Possible(地图分析) c c++ java python go Medium
1171 Remove Zero Sum Consecutive Nodes from Linked List(从链表中删去总和值为零的连续节点) c c++ java python go Medium
1178 Number of Valid Words for Each Puzzle(猜字谜) c c++ java python go Hard
1207 Unique Number of Occurrences(独一无二的出现次数) c c++ java python go Easy
1237 Find Positive Integer Solution for a Given Equation(找出给定方程的正整数解) c c++ java python go Easy
1248 Count Number of Nice Subarrays(统计「优美子数组」) c c++ java python go Medium
1289 Minimum Falling Path Sum II(下降路径最小和 II) c c++ java python go Hard
1290 Convert Binary Number in a Linked List to Integer(二进制链表转整数) c c++ java python go Easy
1300 Sum of Mutated Array Closest to Target(转变数组后最接近目标值的数组和) c c++ java python go Medium
1302 Deepest Leaves Sum(层数最深叶子节点的和) c c++ java python go Medium
1356 Sort Integers by The Number of 1 Bits(根据数字二进制下 1 的数目排序) c c++ java python go Easy
1365 How Many Numbers Are Smaller Than the Current Number(有多少小于当前数字的数字) c c++ java python go Easy
1370 Increasing Decreasing String(上升下降字符串) c c++ java python go Easy
1371 Find the Longest Substring Containing Vowels in Even Counts(每个元音包含偶数次的最长子字符串) c c++ java python go Medium
1380 Lucky Numbers in a Matrix(矩阵中的幸运数) c c++ java python go Easy
1381 Design a Stack With Increment Operation(设计一个支持增量操作的栈) c c++ java python go Medium
1382 Balance a Binary Search Tree(将二叉搜索树变平衡) c c++ java python go Medium
1383 Maximum Performance of a Team(最大的团队表现值) c c++ java python go Hard
1389 Create Target Array in the Given Order(按既定顺序创建目标数组) c c++ java python go Easy
1390 Four Divisors(. 四因数组) c c++ java python go Medium
1394 Find Lucky Integer in an Array(找出数组中的幸运数) c c++ java python go Easy
1395 Count Number of Teams(统计作战单位数) c c++ java python go Medium
1396 Design Underground System(设计地铁系统) c c++ java python go Medium
1403 Minimum Subsequence in Non-Increasing Order(非递增顺序的最小子序列) c c++ java python go Easy
1404 Number of Steps to Reduce a Number in Binary Representation to One(将二进制表示减到 1 的步骤数) c c++ java python go Medium
1408 String Matching in an Array(数组中的字符串匹配) c c++ java python go Easy
1409 Queries on a Permutation With Key(查询带键的排列) c c++ java python go Medium
1410 HTML Entity Parser(HTML 实体解析器) c c++ java python go Medium
1417 Reformat The String(重新格式化字符串) c c++ java python go Easy
1418 Display Table of Food Orders in a Restaurant(点菜展示表) c c++ java python go Medium
1422 Maximum Score After Splitting a String(分割字符串的最大得分) c c++ java python go Easy
1423 Maximum Points You Can Obtain from Cards(可获得的最大点数) c c++ java python go Medium
1431 Kids With the Greatest Number of Candies(拥有最多糖果的孩子) c c++ java python go Easy
1436 Destination City(旅行终点站) c c++ java python go Easy
1437 Check If All 1's Are at Least Length K Places Away(是否所有 1 都至少相隔 k 个元素) c c++ java python go Medium
1441 Build an Array With Stack Operations(用栈操作构建数组) c c++ java python go Easy
1442 Count Triplets That Can Form Two Arrays of Equal XOR(形成两个异或相等数组的三元组数目) c c++ java python go Medium
1450 Number of Students Doing Homework at a Given Time(在既定时间做作业的学生人数) c c++ java python go Easy
1451 Rearrange Words in a Sentence(重新排列句子中的单词) c c++ java python go Medium
1452 People Whose List of Favorite Companies Is Not a Subset of Another List(收藏清单) c c++ java python go Medium
1455 Check If a Word Occurs As a Prefix of Any Word in a Sentence(检查单词是否为句中其他单词的前缀) c c++ java python go Easy
1456 Maximum Number of Vowels in a Substring of Given Length(定长子串中元音的最大数目) c c++ java python go Medium
1463 Cherry Pickup II(摘樱桃 II) c c++ java python go Hard
1480 Running Sum of 1d Array(一维数组的动态和) c c++ java python go Easy
LCP 13 寻宝 c c++ java python go Hard
LCP 19 秋叶收藏集 c c++ java python go Medium
LCP 30 魔塔游戏 c c++ java python go Medium
LCP 31 变换的迷宫 c c++ java python go Hard
LCP 34 二叉树染色 c c++ java python go Medium
金典01.06 字符串压缩 c c++ java python go Easy
金典01.07 旋转矩阵 c c++ java python go Medium
金典02.01 移除重复节点 c c++ java python go Easy
金典08.05 魔术索引 c c++ java python go Easy
金典08.05 递归乘法 c c++ java python go Medium
金典08.09 括号 c c++ java python go Medium
金典08.11 硬币 c c++ java python go Medium
金典08.12 八皇后 c c++ java python go Hard
金典10.01 合并排序的数组 c c++ java python go Easy
金典16.01 交换数字 c c++ java python go Medium
金典16.03 交点 c c++ java python go Hard
金典16.11 跳水板 c c++ java python go Easy
金典16.18 模式匹配 c c++ java python go Medium
金典17.13 恢复空格 c c++ java python go Medium
金典17.16 按摩师 c c++ java python go Easy
面试题03 数组中重复的数字 c c++ java python go Easy
面试题04 二维数组中的查找 c c++ java python go Easy
面试题05 替换空格 c c++ java python go Easy
面试题06 从尾到头打印链表 c c++ java python go Easy
面试题07 重建二叉树 c c++ java python go Medium
面试题09 用两个栈实现队列 c c++ java python go Easy
面试题10- I 斐波那契数列 c c++ java python go Easy
面试题10- II 青蛙跳台阶问题 c c++ java python go Easy
面试题11 旋转数组的最小数字 c c++ java python go Easy
面试题13 机器人的运动范围 c c++ java python go Medium
面试题14 剪绳子 c c++ java python go Medium
面试题14-2 剪绳子-2 c c++ java python go Medium
面试题16 数值的整数次方 c c++ java python go Medium
面试题20 表示数值的字符串 c c++ java python go Medium
面试题24 反转链表 c c++ java python go Easy
面试题27 二叉树的镜像 c c++ java python go Easy
面试题28 对称的二叉树 c c++ java python go Easy
面试题29 顺时针打印矩阵 c c++ java python go Easy
面试题30 包含min函数的栈 c c++ java python go Easy
面试题32-I 从上到下打印二叉树 c c++ java python go Medium
面试题32-II 从上到下打印二叉树 II c c++ java python go Easy
面试题32-III 从上到下打印二叉树 III c c++ java python go Medium
面试题35 复杂链表的复制 c c++ java python go Medium
面试题38 字符串的排列 c c++ java python go Medium
面试题40 最小的k个数 c c++ java python go Easy
面试题42 连续子数组的最大和 c c++ java python go Easy
面试题46 把数字翻译成字符串 c c++ java python go Medium
面试题48 最长不含重复字符的子字符串 c c++ java python go Medium
面试题51 数组中的逆序对 c c++ java python go Hard
面试题54 二叉搜索树的第k大节点 c c++ java python go Easy
面试题55-I 二叉树的深度 c c++ java python go Easy
面试题55-II 平衡二叉树 c c++ java python go Easy
面试题56-I 数组中数字出现的次数 c c++ java python go Medium
面试题57-II 和为s的连续正数序列 c c++ java python go Easy
面试题58-I 翻转单词顺序 c c++ java python go Easy
面试题58-II 左旋转字符串 c c++ java python go Easy
面试题59-II 队列的最大值 c c++ java python go Medium
面试题62 圆圈中最后剩下的数字 c c++ java python go Easy
面试题63 股票的最大利润 c c++ java python go Medium
面试题64 求1+2+…+n c c++ java python go Medium
面试题67 把字符串转换成整数 c c++ java python go Medium
Offer-II-088 爬楼梯的最少成本 c c++ java python go Easy
Offer-II-091 粉刷房子 c c++ java python go Medium

About

LeetCode刷题 的解题代码记录

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages