上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页
摘要: 题目: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is l 阅读全文
posted @ 2015-12-03 05:16 YRB 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: 链接: http://leetcode. 阅读全文
posted @ 2015-12-03 05:04 YRB 阅读(1516) 评论(0) 推荐(0) 编辑
摘要: 题目: There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a ce 阅读全文
posted @ 2015-12-03 04:36 YRB 阅读(729) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree.You may assume each number in the s... 阅读全文
posted @ 2015-12-03 03:36 YRB 阅读(2956) 评论(0) 推荐(0) 编辑
摘要: 题目: Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer n and return all po 阅读全文
posted @ 2015-12-03 00:42 YRB 阅读(2925) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all 阅读全文
posted @ 2015-12-02 10:54 YRB 阅读(713) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement an iterator to flatten a 2d vector. For example,Given 2d vector = By calling next repeatedly until hasNext returns false, the order of e 阅读全文
posted @ 2015-12-02 06:01 YRB 阅读(2005) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. For example:G 阅读全文
posted @ 2015-12-02 04:21 YRB 阅读(1669) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string, we can "shift" each of its letter to its successive letter, for example: "abc" -> "bcd". We can keep "shifting" which forms the se 阅读全文
posted @ 2015-12-01 13:00 YRB 阅读(812) 评论(0) 推荐(0) 编辑
摘要: 题目:A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).Write a function to count the total strob... 阅读全文
posted @ 2015-12-01 06:02 YRB 阅读(685) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 33 下一页