上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页
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 le... Read More
posted @ 2014-08-04 16:21 Xylophone Views(230) Comments(0) Diggs(0)
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 su... Read More
posted @ 2014-08-04 15:45 Xylophone Views(128) Comments(0) Diggs(0)
Given a binary tree, flatten it to a linked list in-place.For example, Given 1 / \ 2 5 / \ \ 3 4 6The flattened ... Read More
posted @ 2014-08-04 15:04 Xylophone Views(155) Comments(0) Diggs(0)
Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from th... Read More
posted @ 2014-08-04 11:38 Xylophone Views(212) Comments(0) Diggs(0)
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil... Read More
posted @ 2014-08-04 10:29 Xylophone Views(128) Comments(0) Diggs(0)
Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3, Return [1,3,3,1].Note: Could you optimize your algorithm to us... Read More
posted @ 2014-08-03 22:25 Xylophone Views(132) Comments(0) Diggs(0)
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... Read More
posted @ 2014-08-03 21:23 Xylophone Views(401) Comments(0) Diggs(0)
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet... Read More
posted @ 2014-08-02 23:19 Xylophone Views(259) Comments(0) Diggs(0)
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example, "A man, a plan, a canal: Pan... Read More
posted @ 2014-08-01 18:52 Xylophone Views(127) Comments(0) Diggs(0)
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be ch... Read More
posted @ 2014-08-01 16:43 Xylophone Views(381) Comments(0) Diggs(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页