lintcode
文章平均质量分 58
晒太阳的猫zh
这个作者很懒,什么都没留下…
展开
-
lintcode 17 Subsets
题目描述DescriptionGiven a set of distinct integers, return all possible subsets.Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.ExampleIf ...原创 2018-10-03 16:25:37 · 211 阅读 · 0 评论 -
lintcode 9 Fizz Buzz
题目描述DescriptionGiven number n. Print number from 1 to n. But:when number is divided by 3, print “fizz”.when number is divided by 5, print “buzz”.when number is divided by both 3 and 5, prin...原创 2018-10-03 16:39:12 · 390 阅读 · 0 评论 -
lintcode 20 Dices Sum
题目描述DescriptionThrow n dices, the sum of the dices’ faces is S. Given n, find the all possible value of S along with its probability.You do not care about the accuracy of the result, we will help ...原创 2018-10-03 19:13:53 · 183 阅读 · 0 评论 -
Lintcode 32 Minimum Window Substring
题目描述DescriptionGiven a string source and a string target, find the minimum window in source which will contain all the characters in target.If there is no such window in source that covers all cha...原创 2018-10-06 19:01:16 · 160 阅读 · 0 评论 -
lintcode 36 Reverse Linked List II
题目描述DescriptionReverse a linked list from position m to n.Given m, n satisfy the following condition: 1 ≤ m ≤ n ≤ length of list.ExampleGiven 1->2->3->4->5->NULL, m = 2 and n = 4...原创 2018-10-18 19:18:05 · 112 阅读 · 0 评论 -
72. Construct Binary Tree from Inorder and Postorder Traversal(中序遍历和后序遍历树构造二叉树)
题目描述DescriptionGiven inorder and postorder traversal of a tree, construct the binary tree.You may assume that duplicates do not exist in the tree.ExampleGiven inorder [1,2,3] and postorder [1,3,2...原创 2019-01-04 16:43:16 · 187 阅读 · 0 评论 -
lintcode81.数据流中位数
题目描述DescriptionNumbers keep coming, return the median of numbers at every time a new number added.ClarificationWhat’s the definition of Median?Median is the number that in the middle of a sorted ...原创 2019-01-17 16:38:22 · 163 阅读 · 0 评论