摘要: 题目链接:https://leetcode.com/problems/intersection-of-two-linked-lists/ 解题思路: 两个链表的公共节点,首先让长的链表先走length1-length2步,然后一起走 阅读全文
posted @ 2019-06-04 23:41 王爷爱吃秋刀鱼 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.com/problems/same-tree/ 解题思路: 死鬼,如果p和q为空,那就相等。如果有一个为空,一个不为空,那就不等。然后两个值相等,那就递归判断下去。 阅读全文
posted @ 2019-06-04 23:20 王爷爱吃秋刀鱼 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.com/problems/reverse-linked-list-ii/ 解题思路: 阅读全文
posted @ 2019-06-04 23:02 王爷爱吃秋刀鱼 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.com/problems/binary-tree-inorder-traversal/ 解题思路: 二叉树的中序遍历。 阅读全文
posted @ 2019-06-04 22:59 王爷爱吃秋刀鱼 阅读(166) 评论(0) 推荐(0) 编辑