Skip to content

Wonz5130/LeetCode-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode-Solutions

💚My own LeetCode solutions

No. Problem LeetCode 力扣 Python Go Solution Difficulty Tag
0017 Letter Combinations of a Phone Number LeetCode 力扣 Python CSDN Medium 回溯、暴力
0034 Find First and Last Position of Element in Sorted Array LeetCode 力扣 Python CSDN Medium 二分
0039 Combination Sum LeetCode 力扣 Python CSDN Medium 回溯
0040 Combination Sum II LeetCode 力扣 Python CSDN Medium 回溯
0046 Permutations LeetCode 力扣 Python CSDN Medium 回溯
0047 Permutations II LeetCode 力扣 Python CSDN Medium 递归、回溯
0051 N-Queens LeetCode 力扣 Python CSDN Hard 回溯
0053 Maximum Subarray LeetCode 力扣 Python CSDN Easy 动态规划
0069 Sqrt(x) LeetCode 力扣 Python CSDN Easy 二分、牛顿迭代
0070 Climbing Stairs LeetCode 力扣 Python CSDN Easy 动态规划
0075 Sort Colors LeetCode 力扣 Python CSDN Medium 荷兰旗
0077 Combinations LeetCode 力扣 Python CSDN Medium 回溯
0079 Word Search LeetCode 力扣 Python CSDN Medium 回溯
0088 Merge Sorted Array LeetCode 力扣 Python CSDN Easy 双指针
0090 Subsets II LeetCode 力扣 Python CSDN Medium 回溯
0093 Restore IP Addresses LeetCode 力扣 Python CSDN Medium 回溯、暴力
0095 Unique Binary Search Trees II LeetCode 力扣 Python CSDN Medium 分治、DFS
0098 Validate Binary Search Tree LeetCode 力扣 Python CSDN Medium 二叉树
0100 Same Tree LeetCode 力扣 Python CSDN Easy 二叉树
0102 Binary Tree Level Order Traversal LeetCode 力扣 Python CSDN Medium 二叉树、BFS
0103 Binary Tree Zigzag Level Order Traversal 二叉树的锯齿形层序遍历 LeetCode 力扣 Python CSDN Medium 二叉树、BFS
0105 Construct Binary Tree from Preorder and Inorder Traversal LeetCode 力扣 Python CSDN Medium 二叉树、递归
0106 Construct Binary Tree from Inorder and Postorder Traversal LeetCode 力扣 Python CSDN Medium 二叉树、递归
0111 Minimum Depth of Binary Tree LeetCode 力扣 Python CSDN Easy 二叉树
0113 Path Sum II LeetCode 力扣 Python CSDN Medium 回溯
0114 Flatten Binary Tree to Linked List二叉树展开为链表 LeetCode 力扣 Python Go CSDN Medium 二叉树
0116 Populating Next Right Pointers in Each Node填充每个节点的下一个右侧节点指针 LeetCode 力扣 Python Go CSDN Medium 二叉树、递归
0121 Best Time to Buy and Sell Stock LeetCode 力扣 Python CSDN Easy 贪心
0122 Best Time to Buy and Sell Stock II LeetCode 力扣 Python CSDN Easy 贪心
0123 Best Time to Buy and Sell Stock III LeetCode 力扣 Python CSDN Hard 动态规划
0127 Word Ladder LeetCode 力扣 Python CSDN Medium BFS
0129 Sum Root to Leaf Numbers求根到叶子节点数字之和 LeetCode 力扣 Python CSDN Medium 二叉树
0130 Surrounded Regions LeetCode 力扣 Python CSDN Medium DFS
0141 Linked List Cycle LeetCode 力扣 Python CSDN Easy 双指针
0144 Binary Tree Preorder Traversal二叉树的前序遍历 LeetCode 力扣 Python CSDN Medium 二叉树
0145 Binary Tree Postorder Traversal二叉树的后序遍历 LeetCode 力扣 Python CSDN Medium 二叉树
0153 Find Minimum in Rotated Sorted Array LeetCode 力扣 Python CSDN Medium 二分
0167 Two Sum II - Input array is sorted LeetCode 力扣 Python CSDN Easy 双指针
0169
0188 Best Time to Buy and Sell Stock IV LeetCode 力扣 Python CSDN Hard 动态规划
0200 Number of Islands LeetCode 力扣 Python CSDN Medium DFS
0206 Reverse Linked List LeetCode 力扣 Python CSDN Easy 链表
0215 Kth Largest Element in an Array LeetCode 力扣 Python CSDN Medium 快排、堆
0222 Count Complete Tree Nodes完全二叉树的节点个数 LeetCode 力扣 Python CSDN Medium 二叉树
0225 Implement Stack using Queues LeetCode 力扣 Python CSDN Easy 栈、队列
0226 Invert Binary Tree LeetCode 力扣 Python Go CSDN Easy 二叉树、递归
0230 Kth Smallest Element in a BST二叉搜索树中第K小的元素 LeetCode 力扣 Python CSDN Medium 二叉树
0235 Lowest Common Ancestor of a Binary Search Tree二叉搜索树的最近公共祖先 LeetCode 力扣 Python CSDN Easy 二叉树
0236 Lowest Common Ancestor of a Binary Tree 二叉树的最近公共祖先 LeetCode 力扣 Python CSDN Medium 二叉树
0240 Search a 2D Matrix II LeetCode 力扣 Python CSDN Medium 数组
0241 Different Ways to Add Parentheses LeetCode 力扣 Python CSDN Medium 分治
0257 Binary Tree Paths LeetCode 力扣 Python CSDN Easy DFS
0278 First Bad Version LeetCode 力扣 Python CSDN Easy 二分
0279 Perfect Squares LeetCode 力扣 Python CSDN Medium BFS、动态规划
0300
0309 Best Time to Buy and Sell Stock with Cooldown LeetCode 力扣 Python CSDN Medium 动态规划
0322
0345 Reverse Vowels of a String LeetCode 力扣 Python CSDN Easy 双指针
0347 Top K Frequent Elements LeetCode 力扣 Python CSDN Medium 桶排序
0365 Water and Jug Problem LeetCode 力扣 Python CSDN Medium BFS、数学
0392 Is Subsequence LeetCode 力扣 Python CSDN Easy 双指针
0406 Queue Reconstruction by Height LeetCode 力扣 Python CSDN Medium 贪心
0409 Longest Palindrome LeetCode 力扣 Python CSDN Easy 字符串
0417 Pacific Atlantic Water Flow LeetCode 力扣 Python CSDN Medium DFS
0429 N-ary Tree Level Order Traversal N 叉树的层序遍历 LeetCode 力扣 Python CSDN Medium 二叉树
0435 Non-overlapping Intervals LeetCode 力扣 Python CSDN Medium 区间贪心
0450 Delete Node in a BST LeetCode 力扣 Python CSDN Medium 二叉树
0451 Sort Characters By Frequency LeetCode 力扣 Python CSDN Medium 桶排序
0452 Minimum Number of Arrows to Burst Balloons LeetCode 力扣 Python CSDN Medium 区间贪心
0455 Assign Cookies LeetCode 力扣 Python CSDN Easy 贪心
0491 Increasing Subsequences LeetCode 力扣 Python CSDN Medium DFS
0508 Most Frequent Subtree Sum出现次数最多的子树元素和 LeetCode 力扣 Python CSDN Medium 二叉树
0509 Fibonacci Number LeetCode 力扣 Python CSDN Easy 动态规划
0513 Find Bottom Left Tree Value找树左下角的值 LeetCode 力扣 Python CSDN Medium 二叉树
0515 Find Largest Value in Each Tree Row在每个树行中找最大值 LeetCode 力扣 Python CSDN Medium 二叉树
0524 Longest Word in Dictionary through Deleting LeetCode 力扣 Python CSDN Medium 双指针
0530 Minimum Absolute Difference in BST二叉搜索树的最小绝对差 LeetCode 力扣 Python CSDN Easy 二叉树
0538 Convert BST to Greater Tree把二叉搜索树转换为累加树 LeetCode 力扣 Python CSDN Medium 二叉树
0540 Single Element in a Sorted Array LeetCode 力扣 Python CSDN Medium 二分
0543 Diameter of Binary Tree LeetCode 力扣 Python CSDN Easy 递归
0547 Friend Circles LeetCode 力扣 Python CSDN Medium DFS
0559 Maximum Depth of N-ary Tree N 叉树的最大深度 LeetCode 力扣 Python CSDN Easy 二叉树
0563 Binary Tree Tilt二叉树的坡度 LeetCode 力扣 Python CSDN Easy 二叉树
0589 N-ary Tree Preorder Traversal N叉树的前序遍历 LeetCode 力扣 Python CSDN Easy 二叉树
0590 N-ary Tree Postorder Traversal N叉树的后序遍历 LeetCode 力扣 Python CSDN Easy 二叉树
0605 Can Place Flowers LeetCode 力扣 Python CSDN Easy 贪心
0606 Construct String from Binary Tree 根据二叉树创建字符串 LeetCode 力扣 Python CSDN Easy 二叉树
0623 Add One Row to Tree 在二叉树中增加一行 LeetCode 力扣 Python CSDN Medium 二叉树
0633 Sum of Square Numbers LeetCode 力扣 Python CSDN Easy 双指针
0647 Palindromic Substrings LeetCode 力扣 Python CSDN Medium 动态规划
0652 Find Duplicate Subtrees 寻找重复的子树 LeetCode 力扣 Python CSDN Medium 二叉树
0653 Two Sum IV - Input is a BST 两数之和 IV - 输入 BST LeetCode 力扣 Python CSDN Easy 二叉树
0654 Maximum Binary Tree最大二叉树 LeetCode 力扣 Python CSDN Medium 二叉树
0655 Print Binary Tree 输出二叉树 LeetCode 力扣 Python CSDN Medium 二叉树
0662 Maximum Width of Binary Tree 二叉树最大宽度 LeetCode 力扣 Python CSDN Medium 二叉树
0665 Non-decreasing Array LeetCode 力扣 Python CSDN Easy 贪心
0669 Trim a Binary Search Tree 修剪二叉搜索树 LeetCode 力扣 Python CSDN Medium 二叉树
0671 Second Minimum Node In a Binary Tree 二叉树中第二小的节点 LeetCode 力扣 Python CSDN Easy 二叉树
0680 Valid Palindrome II LeetCode 力扣 Python CSDN Easy 双指针
0695 Max Area of Island LeetCode 力扣 Python CSDN Medium DFS
0700 Search in a Binary Search Tree LeetCode 力扣 Python CSDN Easy 二叉树
0701 Insert into a Binary Search Tree LeetCode 力扣 Python CSDN Medium 二叉树
0714 Best Time to Buy and Sell Stock with Transaction Fee LeetCode 力扣 Python CSDN Medium 动态规划
0744 Find Smallest Letter Greater Than Target LeetCode 力扣 Python CSDN Easy 二分
0783 Minimum Distance Between BST Nodes二叉搜索树节点最小距离 LeetCode 力扣 Python CSDN Easy 二叉树
0836 Rectangle Overlap LeetCode 力扣 Python CSDN Easy 数学
0876 Middle of the Linked List LeetCode 力扣 Python CSDN Easy 双指针
0892 Surface Area of 3D Shapes LeetCode 力扣 Python CSDN Easy 数学
0914 X of a Kind in a Deck of Cards LeetCode 力扣 Python CSDN Easy 数学
0994 Rotting Oranges LeetCode 力扣 Python CSDN Easy BFS
1013 Partition Array Into Three Parts With Equal Sum LeetCode 力扣 Python CSDN Easy 双指针
1038 Binary Search Tree to Greater Sum Tree把二叉搜索树转换为累加树 LeetCode 力扣 Python CSDN Medium 二叉树
1071 Greatest Common Divisor of Strings LeetCode 力扣 Python CSDN Easy 字符串
1091 Shortest Path in Binary Matrix LeetCode 力扣 Python CSDN Medium BFS
1103 Distribute Candies to People LeetCode 力扣 Python CSDN Easy 暴力
1160 Find Words That Can Be Formed by Characters LeetCode 力扣 Python CSDN Easy 字符串
1358 Number of Substrings Containing All Three Characters LeetCode 力扣 Python CSDN Medium 双指针、滑窗
1360 Number of Days Between Two Dates LeetCode 力扣 Python CSDN Easy 数学
1362 Closest Divisors LeetCode 力扣 Python CSDN Medium 数学
1365 How Many Numbers Are Smaller Than the Current Number LeetCode 力扣 Python CSDN Easy 暴力
1366 Rank Teams by Votes LeetCode 力扣 Python CSDN Medium 排序
1367 Linked List in Binary Tree LeetCode 力扣 Python CSDN Medium DFS
1370 Increasing Decreasing String LeetCode 力扣 Python CSDN Easy 排序
1372 Longest ZigZag Path in a Binary Tree LeetCode 力扣 Python CSDN Medium DFS
1374 Generate a String With Characters That Have Odd Counts LeetCode 力扣 Python CSDN Easy 字符串
1375 Bulb Switcher III LeetCode 力扣 Python CSDN Medium 最大编号
1376 Time Needed to Inform All Employees LeetCode 力扣 Python CSDN Medium 自底向上
1380 Lucky Numbers in a Matrix LeetCode 力扣 Python CSDN Easy 暴力
1381 Design a Stack With Increment Operation LeetCode 力扣 Python CSDN Medium
1382 Balance a Binary Search Tree LeetCode 力扣 Python CSDN Medium 二叉树
1385 Find the Distance Value Between Two Arrays LeetCode 力扣 Python CSDN Easy 暴力
1386 Cinema Seat Allocation LeetCode 力扣 Python CSDN Medium 哈希表
1387 Sort Integers by The Power Value LeetCode 力扣 Python CSDN Medium 排序
1389 Create Target Array in the Given Order LeetCode 力扣 Python CSDN Easy 数组
1390 Four Divisors LeetCode 力扣 Python CSDN Medium 数学
1394 Find Lucky Integer in an Array LeetCode 力扣 Python CSDN Easy 暴力
1395 Count Number of Teams LeetCode 力扣 Python CSDN Medium 暴力
1396 Design Underground System LeetCode 力扣 Python CSDN Medium 设计
1408 String Matching in an Array LeetCode 力扣 Python CSDN Easy 字符串
1409 Queries on a Permutation With Key LeetCode 力扣 Python CSDN Medium 模拟
1410 HTML Entity Parser HTML LeetCode 力扣 Python CSDN Medium 字符串
面试题03 数组中重复的数字 力扣 Python CSDN Easy 哈希
面试题04 二维数组中的查找 力扣 Python CSDN Easy 数组
面试题05 替换空格 力扣 Python CSDN Easy 字符串
面试题06 从尾到头打印链表 力扣 Python CSDN Easy 链表
面试题07 重建二叉树 力扣 Python CSDN Medium 二叉树、递归
面试题09 用两个栈实现队列 力扣 Python CSDN Easy 栈、队列
面试题10- I 斐波那契数列 力扣 Python CSDN Easy 动态规划
面试题10- II 青蛙跳台阶问题 力扣 Python CSDN Easy 动态规划
面试题11 旋转数组的最小数字 力扣 Python CSDN Easy 二叉树
面试题17 打印从1到最大的n位数 力扣 Python CSDN Easy 暴力
面试题26 树的子结构 力扣 Python CSDN Medium DFS
面试题27 二叉树的镜像 力扣 Python CSDN Easy 二叉树、递归
面试题32 - I 从上到下打印二叉树 力扣 Python CSDN Medium 二叉树、BFS
面试题32 - II 从上到下打印二叉树 II 力扣 Python CSDN Easy 二叉树、BFS
面试题32 - III 从上到下打印二叉树 III 力扣 Python CSDN Medium 二叉树、BFS
面试题33 二叉搜索树的后序遍历序列 力扣 Python CSDN Medium 递归
面试题34 二叉树中和为某一值的路径 力扣 Python CSDN Medium 回溯
面试题37 序列化二叉树 力扣 Python CSDN Hard 二叉树
面试题53 - I 在排序数组中查找数字 I 力扣 Python CSDN Easy 二叉树
面试题53 - II 0~n-1中缺失的数字 力扣 Python CSDN Easy 二叉树
面试题 57 - II 和为s的连续正数序列 力扣 Python CSDN Easy 滑窗、数学
面试题59 - II 队列的最大值 力扣 Python CSDN Medium 队列
面试题62 圆圈中最后剩下的数字 力扣 Python CSDN Easy 数学
面试题68 - I 二叉搜索树的最近公共祖先 力扣 Python CSDN Easy 二叉树
面试题68 - II 二叉树的最近公共祖先 力扣 Python CSDN Easy 二叉树
面试题0106 字符串压缩 力扣 Python CSDN Easy 双指针
面试题0107 旋转矩阵 力扣 Python CSDN Medium 数学
面试题0402 最小高度树 力扣 Python CSDN Easy 二叉树
面试题 0403 特定深度节点链表 力扣 Python CSDN Medium 二叉树
面试题 0404 检查平衡性 力扣 Python CSDN Easy 二叉树
面试题 0405 合法二叉搜索树 力扣 Python CSDN Medium 二叉树
面试题 0406 后继者 力扣 Python CSDN Medium 二叉树
面试题 0408 首个共同祖先 力扣 Python CSDN Medium 二叉树
面试0410 检查子树 力扣 Python CSDN Medium DFS
面试0412 求和路径 力扣 Python CSDN Medium 二叉树
面试1001 Sorted Merge LCCI 力扣 Python CSDN Easy 双指针
面试1712 BiNode 力扣 Python CSDN Easy 二叉树

推荐题解

CyC LeetCode 题解

负雪明烛 LeetCode 题解

coordinate LeetCode 题解

书影 LeetCode 题解

ApacheCN LeetCode 题解

PemLer LeetCode 题解

License

MIT

Releases

No releases published

Packages

No packages published