- 博客(8)
- 资源 (14)
- 收藏
- 关注
原创 LeetCode 138. Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.这个题目想了好久,觉得应该用HashMap 之类
2016-08-10 15:43:52 339
原创 LeetCode82.Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->3->3->4->4->5, return 1->2->5.Given 1->
2016-08-08 14:48:20 275
原创 LeetCode80. Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the first fi
2016-08-08 14:06:47 237
原创 LeetCode 110. Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never dif
2016-08-05 17:34:53 269
原创 114. Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened tree should look like: 1
2016-08-05 16:55:11 240
原创 LeetCode 242. Valid Anagram
Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:You may ass
2016-08-04 14:39:16 220
原创 LeetCode105. Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.这种类型的题目经常考选择题。对于这道题,采用的是分治的思想,通过preorder的第一个元素为根元素,将ino
2016-08-04 13:11:15 207
原创 LeetCode 116. Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node.
2016-08-04 09:44:27 193
FrameLayout动态布局
2016-05-14
STM32F0系列参考例程
2012-08-30
c#串口配置窗体(可用于继承窗体)serialport类
2012-02-25
单片机钢琴protel+keil仿真程序 下下来即可运行
2011-05-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人