
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 · 390 阅读 · 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 · 718 阅读 · 0 评论 -
Leetcode刷题--原地算法
刷题时间: 07/01/2019 - 题号 题目 链接 189 Rotate Array https://leetcode.com/problems/rotate-array/ 解题心得 No.189 旋转数组 (AC) 这题解法较多,这里用原地算法解决。 先将k数组长度取模 翻转整个数组,再各自翻转前后两个小段。 ...原创 2019-07-02 20:34:16 · 432 阅读 · 0 评论 -
二叉树前/中/后序遍历的递归与非递归写法
可参考LeetCode: 题号 题目 链接 144 Binary Tree Preorder Traversal https://leetcode.com/problems/binary-tree-preorder-traversal/ 94 Binary Tree Inorder Traversal https://leetcode.com/problems/binary-t...原创 2019-06-10 17:51:40 · 534 阅读 · 0 评论 -
LeetCode提高班第一期——Week7 哈希表专题
刷题时间: 2019/04/27 – 主播:yxc(闫雪灿) 视频链接:https://www.bilibili.com/video/av35162859 题号 题目 链接 解题心得原创 2019-06-06 18:23:07 · 496 阅读 · 0 评论 -
Leetcode刷题(Week2)—— 位运算
题号 题目 链接 461 Hamming Distance https://leetcode.com/problems/hamming-distance/ 解体心得 No.461 求两个int类型的整数二进制位的值不相同的共有几位 按位枚举。 x >> 10 & 1用于求x的第10位的值是0还是1 ...原创 2019-06-06 18:21:05 · 227 阅读 · 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 · 321 阅读 · 0 评论 -
Leetcode刷题(Week6)—— 二分与单调队列/栈专题
刷题时间: 2019/04/15 – 主播:yxc(闫雪灿) 视频链接: https://www.bilibili.com/video/av35162983 在这里插入图片描述原创 2019-04-19 11:35:47 · 506 阅读 · 0 评论 -
Leetcode刷题(Week5)——字符串专题
刷题时间: 2019/04/08 – 主播:yxc(闫学灿) 视频链接:https://www.bilibili.com/video/av35164027?from=search&seid=5284571979100115908原创 2019-04-15 10:51:50 · 382 阅读 · 1 评论 -
暑期LeetCode打卡——Week1,链表
刷题时间: 2019/04/20 – 主播:yxc(闫雪灿) 视频链接: https://v.douyu.com/show/jwzOvpw6DDEWZVRm 题号 题目 链接 19 Remove Nth Node From End of List https://leetcode.com/problems/remove-nth-node-from-end-of-list/ 83...原创 2019-04-22 11:58:28 · 336 阅读 · 0 评论 -
暑期LeetCode打卡(Week3)——树专题(递归-非递归)
刷题时间:2019/04/19 – 主播:yxc(闫雪灿) 视频链接:https://v.douyu.com/show/mPyq7oJDm4qv1gLY 题号 | 题目 | 链接原创 2019-04-20 21:48:44 · 319 阅读 · 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 · 159 阅读 · 0 评论 -
Leetcode刷题(Week3)——贪心专题
刷题时间: 2019/04/07 – 主播:yxc(闫雪灿) 视频链接: https://www.bilibili.com/video/av32864007/?p=1 题号 题目 链接 860 Lemonade Change https://leetcode.com/problems/lemonade-change/ 392 Is Subsequence https://lee...原创 2019-04-08 17:35:19 · 450 阅读 · 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 · 270 阅读 · 0 评论