Leetcode已刷题目题解汇总


Leetcode已刷题目题解链接汇总(持续更新中。。。。。。。)

分类题解链接

【Easy-Brainteaser】
脑筋急转弯
1道
292. Nim Game(尼姆游戏)

【Easy-Sort 】
排序
3道

242. Valid Anagram(有颠倒顺序构成的字符串—字符串排序(c++和python)
349. Intersection of Two Arrays(两数组的交集,vector中find()函数, 结果集去重)
350. Intersection of Two Arrays II(两数组交集)


【Easy-Greedy】
贪心
2道
122. Best Time to Buy and Sell Stock II(股票多次买卖的最佳时间–贪心)
455. Assign Cookies(分蛋糕–贪心)


【Easy-Stack】

6道

20. Valid Parentheses(有效括号-栈)
155. Min Stack(带有获取当前最小值的栈)
225. Implement Stack using Queues(用队列模拟栈)
232.Implement Queue using Stacks
496.Next Greater Element I
682.Baseball Game



【Easy-Queue】
队列
6道

20. Valid Parentheses(有效括号-栈)
155. Min Stack(带有获取当前最小值的栈)
225. Implement Stack using Queues(用队列模拟栈)
232.Implement Queue using Stacks
496.Next Greater Element I
682.Baseball Game


【Easy-Dynamic Programming】
动态规划
6道

53. Maximum Subarray(连续子序列的最大和)
70. Climbing Stairs(爬楼梯
121. Best Time to Buy and Sell Stock(股票一次买卖的最佳时期—动态规划)
198. House Robber(动态规划–房屋强盗) 303. Range Sum Query - Immutable(和累加法) 746. Min Cost Climbing Stairs(最低花费登楼梯–动态规划)

















【Easy-Array】
数组
50道

1. Two Sum(哈希)
26. Remove Duplicates from Sorted Array
27. Remove Element
35. Search Insert Position
53. Maximum Subarray(连续子序列的最大和)
66. Plus One &&Add Binary (大数)
88. Merge Sorted Array
118. Pascal’s Triangle(杨辉三角I)
119. Pascal’s Triangle II(杨辉三角II)
121. Best Time to Buy and Sell Stock(股票一次买卖的最佳时期—动态规划)
122. Best Time to Buy and Sell Stock II(股票多次买卖的最佳时间–贪心)
167. Two Sum II - Input array is sorted(双向查找)
169. Majority Element(四种解法)
189. Rotate Array(翻转数组)
217. Contains Duplicate(包含副本)
219. Contains Duplicate II(包含副本II)
268. Missing Number(异或)
283. Move Zeroes
414. Third Maximum Number
448. Find All Numbers Disappeared in an Array
485. Max Consecutive Ones
532. K-diff Pairs in an Array(k差异对
561. Array Partition I
566. Reshape the Matrix(重塑矩阵)
581. Shortest Unsorted Continuous Subarray(最短未排连续子数组)
605. Can Place Flowers
628.aximum Product of Three Numbers(三个数最大积)
643. Maximum Average Subarray I(连续子数组的最大平均值
661. Image Smoother
665. Non-decreasing Array(非递减数组)
674. Longest Continuous Increasing Subsequence(最长连续递增子序列的长度))
695. Max Area of Island(岛屿最大面积,深搜dfs)
697. Degree of an Array(数组的度)
717. 1-bit and 2-bit Characters
724. Find Pivot Index
746. Min Cost Climbing Stairs(最低花费登楼梯–动态规划)
747. Largest Number At Least Twice of Others
766. Toeplitz Matrix (托普利兹矩阵)

2. Add Two Numbers(链表模拟大数算法)
3. Longest Substring Without Repeating Characters(最长不重复子串-哈希))
4.Median of Two Sorted Arrays(归并排序&二分查找求第k小的数)
5. Longest Palindromic Substring(最长回文子串:二种解法)
7. Reverse Integer(位运算)
8. String to Integer (atoi)(字符串转数字)
9. Palindrome Number(回文数)
12. Roman to Integer (阿拉伯数字转化罗马数字)
13. Roman to Integer (罗马数字转化阿拉伯数字)
14. Longest Common Prefix (最长公共前缀字符串)

21. Merge Two Sorted Lists (归并排序之单链表)

28. Implement strStr()(String find()函数的用法)

38. Count and Say (模拟)

58. Length of Last Word

100. Same Tree(判断两个二叉树相同)
101. Symmetric Tree(对称树)
104. Maximum Depth of Binary Tree(最大二叉树的深度)
107. Binary Tree Level Order Traversal II (queue二叉树层次遍历)
108. Convert Sorted Array to Binary Search Tree (平衡二叉查找树)
110. Balanced Binary Tree(判断是否是平衡二叉树)
111. Minimum Depth of Binary Tree(二叉树的最小深度

125. Valid Palindrome(合法的回文串)
136. Single Number(出现一次的数&异或)

168. Excel Sheet Column Title(Excel表列名–进制转换)

171. Excel Sheet Column Number(Excel表列号–进制转换)
176. Second Highest Salary(第二高薪水 - SQL语句)

190. Reverse Bits (反向位&位运算)
191. Number of 1 Bits(位运算)

231. Power of Two(2次幂)
257. Binary Tree Paths(二叉树的所有路径)
258. Add Digits (数字根)

326. Power of Three(3次幂)
342. Power of Four(4次幂)
344. Reverse String
371. Sum of Two Integers (位运算实现加法)
389. Find the Difference(位运算=异或)
412. Fizz Buzz

415. Add Strings (大数加法超简单写法)
415. Add Strings (大数加法超简单写法)

461Hamming Distance(异或)
476. Number Complement(求补码)

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值