摘要:
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
阅读(125)
评论(0)
推荐(0)
摘要:
The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another n 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(84)
评论(0)
推荐(0)
摘要:
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
阅读(97)
评论(0)
推荐(0)
摘要:
Given a binary tree and a sum, determine if the tree has a root to leaf path such that adding up all the values along the path equals the given sum. N 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(93)
评论(0)
推荐(0)
摘要:
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2018-11-30 15:16
bernieloveslife
阅读(70)
评论(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
阅读(121)
评论(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
阅读(98)
评论(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
阅读(109)
评论(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
阅读(80)
评论(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
阅读(74)
评论(0)
推荐(0)

浙公网安备 33010602011771号