2014年12月29日

Construct Binary Tree from Preorder and Inorder Traversal

摘要: Given preorder and inorder traversal of a tree, construct the binary tree.这道题是要根据先序遍历和中序遍历构造出一棵二叉树,这道题和上一题是一样的。上一题不过是通过后序遍历和中序遍历构造一棵二叉树。只要将代码稍稍修改即可 1 ... 阅读全文

posted @ 2014-12-29 20:29 luckygxf 阅读(157) 评论(0) 推荐(0) 编辑

Construct Binary Tree from Inorder and Postorder Traversal

摘要: Given inorder and postorder traversal of a tree, construct the binary tree.根据树的中序(左根右)和后序遍历(左右根)构造一棵二叉树参考:http://www.cnblogs.com/remlostime/archive/20... 阅读全文

posted @ 2014-12-29 19:51 luckygxf 阅读(208) 评论(0) 推荐(0) 编辑

Excel Sheet Column Number

摘要: For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 看成26进制和10进制之间的转换,Excel Sheet Column Title这道题的逆过程 1 public class S... 阅读全文

posted @ 2014-12-29 16:30 luckygxf 阅读(202) 评论(0) 推荐(0) 编辑

导航