摘要: Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2016-01-11 16:47 zhanghill 阅读(113) 评论(0) 推荐(0)
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie... 阅读全文
posted @ 2016-01-11 16:35 zhanghill 阅读(266) 评论(0) 推荐(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... 阅读全文
posted @ 2016-01-11 14:14 zhanghill 阅读(136) 评论(0) 推荐(0)
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe... 阅读全文
posted @ 2016-01-11 14:08 zhanghill 阅读(149) 评论(0) 推荐(0)