摘要: Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed num... 阅读全文
posted @ 2015-03-13 19:05 A_zhu 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Hide TagsTreeDepth-first Search 实现方法有两种,一种是二叉树自下往上 实... 阅读全文
posted @ 2015-03-13 17:38 A_zhu 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe... 阅读全文
posted @ 2015-03-13 13:04 A_zhu 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next... 阅读全文
posted @ 2015-03-13 12:47 A_zhu 阅读(172) 评论(0) 推荐(0) 编辑