摘要: The problem:Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.My analysis:The problem is easy at some extent,... 阅读全文
posted @ 2015-01-09 11:10 airforce 阅读(212) 评论(0) 推荐(0) 编辑
摘要: The problem:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(... 阅读全文
posted @ 2015-01-09 01:30 airforce 阅读(118) 评论(0) 推荐(0) 编辑