摘要:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2018-03-17 14:20
轻风舞动
阅读(364)
评论(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. F 阅读全文
posted @ 2018-03-17 13:22
轻风舞动
阅读(1029)
评论(0)
推荐(0)
摘要:
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2018-03-17 07:51
轻风舞动
阅读(1466)
评论(0)
推荐(0)
摘要:
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
posted @ 2018-03-17 07:36
轻风舞动
阅读(238)
评论(0)
推荐(0)
摘要:
Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. For ex 阅读全文
posted @ 2018-03-17 07:30
轻风舞动
阅读(310)
评论(0)
推荐(0)
摘要:
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You shou 阅读全文
posted @ 2018-03-17 07:21
轻风舞动
阅读(500)
评论(0)
推荐(0)
摘要:
Implement int sqrt(int x). Compute and return the square root of x. 求一个数的平方根。 解法:二分法,迭代循环在x范围内找中间值mid,然后判断mid * mid和x,如果mid > x/mid(不要写成middle*middle= 阅读全文
posted @ 2018-03-17 06:26
轻风舞动
阅读(1223)
评论(0)
推荐(0)

浙公网安备 33010602011771号