![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
文章平均质量分 84
MaggieYue
这个作者很懒,什么都没留下…
展开
-
Leetcode刷题(Week1)——宽(深)度优先遍历专题
刷题时间: 2019/04/04 –主播:yxc(闫雪灿)题号代号代号我熊猫烧香想你想销售部Minimum Depth of Binary Tree (https://leetcode.com/problems/minimum-depth-of-binary-tree/)...原创 2023-07-08 22:06:10 · 301 阅读 · 0 评论 -
Leetcode刷题 ——N Sum问题总结
2Sum(https://leetcode.com/problems/two-sum/)详细题解:https://www.acwing.com/solution/LeetCode/content/47/题目描述给定一个整型数组,要求返回两个数的**下标**,使得两数之和等于给定的目标值,要求同一个下标不能使用两次。数据保证有且仅有一组解。样例给定数组 nums = [2, 7, 1...原创 2019-08-04 13:30:07 · 604 阅读 · 0 评论 -
Leetcode刷题--原地算法
刷题时间: 07/01/2019 -题号题目链接189Rotate Arrayhttps://leetcode.com/problems/rotate-array/解题心得No.189 旋转数组 (AC)这题解法较多,这里用原地算法解决。先将k数组长度取模翻转整个数组,再各自翻转前后两个小段。...原创 2019-07-02 20:34:16 · 381 阅读 · 0 评论 -
二叉树前/中/后序遍历的递归与非递归写法
可参考LeetCode:题号题目链接144Binary Tree Preorder Traversalhttps://leetcode.com/problems/binary-tree-preorder-traversal/94Binary Tree Inorder Traversalhttps://leetcode.com/problems/binary-t...原创 2019-06-10 17:51:40 · 470 阅读 · 0 评论 -
LeetCode提高班第一期——Week7 哈希表专题
刷题时间: 2019/04/27 –主播:yxc(闫雪灿)视频链接:https://www.bilibili.com/video/av35162859题号题目链接解题心得原创 2019-06-06 18:23:07 · 439 阅读 · 0 评论 -
Leetcode刷题(Week2)—— 位运算
题号题目链接461Hamming Distancehttps://leetcode.com/problems/hamming-distance/解体心得No.461 求两个int类型的整数二进制位的值不相同的共有几位按位枚举。x >> 10 & 1用于求x的第10位的值是0还是1...原创 2019-06-06 18:21:05 · 161 阅读 · 0 评论 -
暑期LeetCode打卡——Week2,递归
刷题时间: 2019/04/19 – 2019/04/19主播:yxc(闫雪灿)视频链接: https://v.douyu.com/show/mPyq7oJDm4qv1gLY题号 | 题目 | 链接17 | Letter Combinations of a Phone Number | https://leetcode.com/problems/letter-combinations-of...原创 2019-04-19 21:49:29 · 231 阅读 · 0 评论 -
Leetcode刷题(Week6)—— 二分与单调队列/栈专题
刷题时间: 2019/04/15 –主播:yxc(闫雪灿)视频链接: https://www.bilibili.com/video/av35162983在这里插入图片描述原创 2019-04-19 11:35:47 · 431 阅读 · 0 评论 -
Leetcode刷题(Week5)——字符串专题
刷题时间: 2019/04/08 –主播:yxc(闫学灿)视频链接:https://www.bilibili.com/video/av35164027?from=search&seid=5284571979100115908原创 2019-04-15 10:51:50 · 289 阅读 · 1 评论 -
暑期LeetCode打卡——Week1,链表
刷题时间: 2019/04/20 –主播:yxc(闫雪灿)视频链接: https://v.douyu.com/show/jwzOvpw6DDEWZVRm题号题目链接19Remove Nth Node From End of Listhttps://leetcode.com/problems/remove-nth-node-from-end-of-list/83...原创 2019-04-22 11:58:28 · 281 阅读 · 0 评论 -
暑期LeetCode打卡(Week3)——树专题(递归-非递归)
刷题时间:2019/04/19 –主播:yxc(闫雪灿)视频链接:https://v.douyu.com/show/mPyq7oJDm4qv1gLY题号 | 题目 | 链接原创 2019-04-20 21:48:44 · 259 阅读 · 0 评论 -
排序算法总结
时间:2019/04/09文章总结了常用了几种排序算法,包括选择排序,冒泡排序,直接插入排序,快速排序,归并排序,希尔排序,堆排序,拓扑排序选择排序O(n^2),O(1)思路:每次从待排序的元素中选出一个最小(大)的元素作为已排好序数组的最后一个元素。void select_sort(vector<int> array) { int len = array.size(); ...原创 2019-04-09 23:38:59 · 125 阅读 · 0 评论 -
Leetcode刷题(Week3)——贪心专题
刷题时间: 2019/04/07 –主播:yxc(闫雪灿)视频链接: https://www.bilibili.com/video/av32864007/?p=1题号题目链接860Lemonade Changehttps://leetcode.com/problems/lemonade-change/392Is Subsequencehttps://lee...原创 2019-04-08 17:35:19 · 352 阅读 · 0 评论 -
Leetcode--买卖股票的最佳时机总结
Leetcode121 Best Time to Buy and Sell Stock (至多一笔交易)(https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)详细题解: https://www.acwing.com/solution/LeetCode/content/214/题目描述假设你有一个数组,其中第i个元素表...原创 2019-08-07 18:14:53 · 228 阅读 · 0 评论