Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2014-08-17 21:11:02
阅读次数:
213
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:
其他好文 时间:
2014-08-17 21:08:02
阅读次数:
339
proftpd的配置方式类似apache,比vsftpd更易用,xampp就集成了proftpd. apt-cache search proftpd 搜索相关包 sudo apt-get install proftpd-basic 安装 安装时默认作为一个standalone server运行proftpd,如果每天的...
分类:
其他好文 时间:
2014-08-17 18:43:02
阅读次数:
296
Word Segmenting
Time Limit: 5 Seconds
Memory Limit: 32768 KB Special Judge
One key technology in Chinese search engine is Word Segmenting, which is more difficult than English Word Segmenting...
分类:
其他好文 时间:
2014-08-17 17:06:42
阅读次数:
364
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.思路:取数组的中点为树的根,前半部分为左子树,后半部分为右子树。 1 class Solution { 2...
分类:
其他好文 时间:
2014-08-17 13:02:12
阅读次数:
210
1、 skiplist 巩固skiplist 跳跃表,简单理解是用空间换时间,来实现链表二分查找的数据结构可以用pre、next、blow、above实现四向的链表操作,可以简化search、insert、delete、get等操作时间复杂度:2、 lucene 巩固开源的全文检索引擎框架主要过程:...
分类:
Web程序 时间:
2014-08-17 11:45:02
阅读次数:
256