上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) 二叉树的遍历总结 (前序、中序、后序、层序、 之字形层序、垂直遍历) 三种递归遍历 //前序遍历(根-左-右) void preorder(TreeNode *root, vector<int> &path) { if(ro 阅读全文
posted @ 2019-01-05 19:25 wikiwen 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) Palindrome Linked List Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Outpu 阅读全文
posted @ 2019-01-05 16:57 wikiwen 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are 阅读全文
posted @ 2019-01-05 16:56 wikiwen 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) 328. Odd Even Linked List Given a singly linked list, group all odd nodes together followed by the even nodes. P 阅读全文
posted @ 2019-01-05 16:56 wikiwen 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) 138. Copy List with Random Pointer A linked list is given such that each node contains an additional random poin 阅读全文
posted @ 2019-01-05 16:55 wikiwen 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) 141. Linked List Cycle Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it witho 阅读全文
posted @ 2019-01-05 16:54 wikiwen 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) 21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be mad 阅读全文
posted @ 2019-01-05 16:54 wikiwen 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) 52 两个链表的第一个公共结点 题目描述 输入两个链表,找出它们的第一个公共结点。 /* struct ListNode { int val; struct ListNode *next; ListNode(int x) : 阅读全文
posted @ 2019-01-05 16:53 wikiwen 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) 19. Remove Nth Node From End of List Given a linked list, remove the n-th node from the end of list and return i 阅读全文
posted @ 2019-01-05 16:49 wikiwen 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 【LeetCode & 剑指offer 刷题笔记】目录(持续更新中...) Delete Node in a Linked List Write a function to delete a node (except the tail) in a singly linked list, given 阅读全文
posted @ 2019-01-05 16:48 wikiwen 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页