摘要: 题目:Given an array ofnintegersnumsand atarget, find the number of index tripletsi, j, kwith0 <= i < j < k < nthat satisfy the conditionnums[i] + nums[j... 阅读全文
posted @ 2015-12-03 06:29 YRB 阅读(1187) 评论(0) 推荐(0) 编辑
摘要: 题目: 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) 编辑