摘要: 题目: 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 3Return 6. 解题思路:最长路... 阅读全文
posted @ 2014-05-27 18:09 mickole 阅读(566) 评论(0) 推荐(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 complete at most two transactions. Note: You m... 阅读全文
posted @ 2014-05-27 10:29 mickole 阅读(336) 评论(0) 推荐(0) 编辑