摘要: Binary Tree Postorder TraversalGiven a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \... 阅读全文
posted @ 2015-09-04 23:42 Sean_le 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Inorder TraversalGiven a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ... 阅读全文
posted @ 2015-09-04 23:38 Sean_le 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ... 阅读全文
posted @ 2015-09-04 22:45 Sean_le 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl... 阅读全文
posted @ 2015-09-04 22:28 Sean_le 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IVSay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ... 阅读全文
posted @ 2015-09-04 20:19 Sean_le 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the... 阅读全文
posted @ 2015-09-04 17:15 Sean_le 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to compl... 阅读全文
posted @ 2015-09-04 12:27 Sean_le 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ... 阅读全文
posted @ 2015-09-04 12:17 Sean_le 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Delete Node in a Linked ListWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the l... 阅读全文
posted @ 2015-09-04 11:53 Sean_le 阅读(118) 评论(0) 推荐(0) 编辑