- 博客(5)
- 收藏
- 关注
原创 LeetCode 141. Linked List Cycle
题目链接 141. Linked List Cycle Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 解: 满足 without using extra space这个要求的话,可
2017-12-24 17:16:46 132
原创 LeetCode 112. Path Sum--递归
题目链接 112. Path Sum Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the
2017-12-24 16:20:32 124
原创 LeetCode 60. Permutation Sequence
题目链接 60. Permutation Sequence The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following sequence (ie, f
2017-12-09 19:10:56 153
原创 LeetCode 236. Lowest Common Ancestor of a Binary Tree--递归
题目链接 236. Lowest Common Ancestor of a Binary Tree Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia:
2017-12-08 09:36:12 131
原创 LeetCode 87. Scramble String
题目链接 87. Scramble String Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = "grea
2017-12-05 21:03:22 134
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人