摘要:
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(98)
评论(0)
推荐(0)
摘要:
Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node's value equals the given value. Retu 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(100)
评论(0)
推荐(0)
摘要:
Given a C++ program, remove comments from it. The program source is an array where source[i] is the i th line of the source code. This represents the 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(127)
评论(0)
推荐(0)
摘要:
Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. Example: Input: 3 Output: [ [1,null,3,2], 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(122)
评论(0)
推荐(0)
摘要:
Given a non negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(111)
评论(0)
推荐(0)
摘要:
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(82)
评论(0)
推荐(0)
摘要:
Write a function that takes a string as input and returns the string reversed. Example 1: Input: "hello" Output: "olleh" Example 2: Input: "A man, a p 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(75)
评论(0)
推荐(0)
摘要:
You have a total of n coins that you want to form in a staircase shape, where every k th row must have exactly k coins. Given n, find the total number 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(95)
评论(0)
推荐(0)
摘要:
We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(119)
评论(0)
推荐(0)
摘要:
Given a binary tree, return all root to leaf paths. Note: A leaf is a node with no children. Example: Input: Output: ["1 2 5", "1 3"] Explanation: All 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(361)
评论(0)
推荐(0)

浙公网安备 33010602011771号