2014年8月22日

Distinct Subsequences

摘要: 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 t 阅读全文

posted @ 2014-08-22 20:26 bug睡的略爽 阅读(135) 评论(0) 推荐(0) 编辑

Binary Tree Maximum Path Sum

摘要: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example:Given the below binary tree, 1 / \ 2 3 阅读全文

posted @ 2014-08-22 16:53 bug睡的略爽 阅读(119) 评论(0) 推荐(0) 编辑

Longest Consecutive Sequence

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes 阅读全文

posted @ 2014-08-22 16:21 bug睡的略爽 阅读(137) 评论(0) 推荐(0) 编辑

Sum Root to Leaf Numbers

摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文

posted @ 2014-08-22 15:55 bug睡的略爽 阅读(106) 评论(0) 推荐(0) 编辑

导航