Mobile phoneshttp://poj.org/problem?id=1195 1 #include 2 #include 3 #define mt(a,b) memset(a,b,sizeof(a)) 4 const int M=1030; 5 class Two_Tree_Array {...
分类:
其他好文 时间:
2014-08-01 13:03:01
阅读次数:
168
Shoulder bags are very nice to have, it can be fun and funky if you use it in the right clothes. It can also be a great gift to give your friends some...
分类:
其他好文 时间:
2014-08-01 12:52:31
阅读次数:
219
//文件或目录转换成 TreeViewprocedure DirToTreeView(Tree: TTreeView; Directory: string; Root: TTreeNode; IncludeFiles:Boolean);varSearchRec: TSearchRec;ItemTem...
分类:
其他好文 时间:
2014-08-01 12:52:21
阅读次数:
267
系统环境: ubuntu12.04安装vm tools时出现如下问题The path "/usr/bin/gcc" is not valid path to the gcc binary解决方案:#cat /proc/versionLinux version 3.2.0-29-generic (bu...
分类:
其他好文 时间:
2014-08-01 10:31:21
阅读次数:
230
题目:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 w....
分类:
编程语言 时间:
2014-08-01 06:57:21
阅读次数:
297
求解最小生成树(Minimum Cost Spanning Tree,以下简写做MST)是图相关的算法中常见的一个,本篇介绍两种求解MST的算法:Prim和Kruskal,然后测试之。
分类:
其他好文 时间:
2014-08-01 06:57:11
阅读次数:
394
题目:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.题解:这道题跟pre....
分类:
编程语言 时间:
2014-08-01 06:56:51
阅读次数:
185
题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.题解: 1 ...
分类:
编程语言 时间:
2014-08-01 06:56:41
阅读次数:
228
题目:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题解:之前做过一道是从sorted array转换到BinarySearc....
分类:
编程语言 时间:
2014-08-01 04:54:21
阅读次数:
310
题目: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return....
分类:
编程语言 时间:
2014-08-01 04:53:31
阅读次数:
279