摘要:
题目:Given an array ofnintegersnumsand atarget, find the number of index tripletsi, j, kwith0 <= i < j < k < nthat satisfy the conditionnums[i] + nums[j... 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: 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. 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: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... 阅读全文
摘要:
题目: 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 阅读全文