会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
王爷爱吃秋刀鱼
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
13
下一页
2019年6月23日
剑指offer——倒数第k个节点
摘要: 先走k-1步,然后判断fast有没有到空为止.
阅读全文
posted @ 2019-06-23 19:04 王爷爱吃秋刀鱼
阅读(98)
评论(0)
推荐(0)
2019年6月19日
347. 前K个高频元素
摘要: 题目链接: https://leetcode-cn.com/problems/top-k-frequent-elements/ 解题思路: 多了一个hashmap的排序
阅读全文
posted @ 2019-06-19 21:42 王爷爱吃秋刀鱼
阅读(140)
评论(0)
推荐(0)
剑指offer——最小的K个数和数组中第K大的元素
摘要: 解题思路: 乘着做这个题,顺便复习下堆排序。 先说堆排序是一个什么东西:https://blog.csdn.net/u013384984/article/details/79496052 大顶堆升序,小顶堆降序。 随便定义的一个堆。 第一步: 此时我们从最后一个非叶子结点开始(叶结点自然不用调整,第
阅读全文
posted @ 2019-06-19 20:55 王爷爱吃秋刀鱼
阅读(335)
评论(0)
推荐(0)
2019年6月9日
Leetcode刷题指南链接整理
摘要: https://leetcode.com/problemset/top-interview-questions/
阅读全文
posted @ 2019-06-09 13:03 王爷爱吃秋刀鱼
阅读(213)
评论(0)
推荐(0)
2019年6月4日
160. Intersection of Two Linked Lists
摘要: 题目链接:https://leetcode.com/problems/intersection-of-two-linked-lists/ 解题思路: 两个链表的公共节点,首先让长的链表先走length1-length2步,然后一起走
阅读全文
posted @ 2019-06-04 23:41 王爷爱吃秋刀鱼
阅读(117)
评论(0)
推荐(0)
100. Same Tree
摘要: 题目链接:https://leetcode.com/problems/same-tree/ 解题思路: 死鬼,如果p和q为空,那就相等。如果有一个为空,一个不为空,那就不等。然后两个值相等,那就递归判断下去。
阅读全文
posted @ 2019-06-04 23:20 王爷爱吃秋刀鱼
阅读(145)
评论(0)
推荐(0)
92. Reverse Linked List II
摘要: 题目链接:https://leetcode.com/problems/reverse-linked-list-ii/ 解题思路:
阅读全文
posted @ 2019-06-04 23:02 王爷爱吃秋刀鱼
阅读(238)
评论(0)
推荐(0)
94. Binary Tree Inorder Traversal
摘要: 题目链接:https://leetcode.com/problems/binary-tree-inorder-traversal/ 解题思路: 二叉树的中序遍历。
阅读全文
posted @ 2019-06-04 22:59 王爷爱吃秋刀鱼
阅读(175)
评论(0)
推荐(0)
2019年6月3日
79. Word Search
摘要: 题目链接:https://leetcode.com/problems/word-search/ 解题思路: 这个题目和剑指offer上的路径问题是一样的,今天再次复习一下写法。
阅读全文
posted @ 2019-06-03 20:22 王爷爱吃秋刀鱼
阅读(145)
评论(0)
推荐(0)
2019年6月1日
78,90,Subsets,46,47,Permutations,39,40 DFS 大合集
摘要: 题目链接: https://leetcode.com/problems/subsets/ 78: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The soluti
阅读全文
posted @ 2019-06-01 12:29 王爷爱吃秋刀鱼
阅读(327)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
13
下一页
公告