Problem Description:
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 nodes with keys l...
分类:
其他好文 时间:
2014-05-15 11:22:21
阅读次数:
317
MongoDB 学习笔记一 安装以及基础命令...
分类:
数据库 时间:
2014-05-15 05:07:59
阅读次数:
371
1、
??
Populating Next Right Pointers in Each Node
Given a binary tree
struct TreeLinkNode {
TreeLinkNode *left;
TreeLinkNode *right;
TreeLinkNode *next;
}
Populate...
分类:
其他好文 时间:
2014-05-15 04:57:36
阅读次数:
221
题意:移除链表的倒数第n个元素
思路:
两个指针p, q,
p先走n步,然后p,q一起走,当p走到尾的时候,q->next就是要删除的节点
复杂度: 时间O(n),空间O(1)...
分类:
其他好文 时间:
2014-05-15 02:53:13
阅读次数:
241
【MongDB运维】MongDB自动安装脚本--rpm包安装版...
分类:
数据库 时间:
2014-05-15 01:38:14
阅读次数:
369
Pat1043代码题目描述:A Binary Search Tree (BST) is
recursively defined as a binary tree which has the following properties:The left
subtree of a node contain...
分类:
其他好文 时间:
2014-05-14 22:03:25
阅读次数:
487
这篇文章提出了backgroundjs这个新的概念,扩展了Node.js的能力,解决了Node在处理CPU密集任务时的短板。这个解决方案使得使用Node的开发人员只需要关注backgroundjs中的函数。比起多开进程或者新添加模块的解决方案更高效,通用和一致。...
分类:
Web程序 时间:
2014-05-14 21:16:18
阅读次数:
502
本文使用官方C# Driver,实现在MongoDB中存储,查询空间数据(矢量)
空间数据的存储
本例中,从一个矢量文件(shapefile格式)中读取矢量要素空间信息以及属性表,并写入到MongoDB中去,其中读取shapefile文件以及将空间信息转成json的功能通过Ogr库实现
//打开MongoDB的Collection...
分类:
数据库 时间:
2014-05-14 20:00:22
阅读次数:
541
出现no write has been done on this connection解决方案...
分类:
数据库 时间:
2014-05-14 19:42:51
阅读次数:
403
node.js API 英文原版
http://nodejs.org/api/all.html
node.js API 中文翻译
http://nodeapi.ucdok.com/#/api/
node.js API 中文翻译下载
http://download.csdn.net/detail/bad19876414641/4608699
javascrip...
分类:
Web程序 时间:
2014-05-14 15:15:10
阅读次数:
329