【题目】
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
【题意】
判断二叉树是否是平衡二叉树
【思路】
平衡二...
分类:
其他好文 时间:
2014-06-20 11:02:54
阅读次数:
173
找到对应的网卡名称
使用命令:ipconfig
ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : D501-4-3
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . ....
题意:求1到2所有路径中最小蛙跳
蛙跳:在一条路径中所有蛙跳中的最大蛙跳思路:dijska算法思想#include#includeusing namespace std;struct
Node{ double x,y;}node[222];double dist[222];int s[222];in...
分类:
其他好文 时间:
2014-06-11 12:40:47
阅读次数:
218
1, 安装nodejs安装python。2,安装node-gyp:sudo npm
install -g
node-gyp3,写代码:新建一个目录,创建hello.cc文件,然后创建binding.gyp文件:hello.cc#include#includeusingnamespace
v8;Han...
分类:
编程语言 时间:
2014-06-11 11:10:24
阅读次数:
380
下面实现的是一个简单的单链表功能不多,学习使用#pragma once#include
using namespace std;class ListEx{private: struct Node { Node* next; int data;
N...
分类:
编程语言 时间:
2014-06-11 10:06:26
阅读次数:
246
修改环境变量:process.env.NODE_TLS_REJECT_UNAUTHORIZED =
"0"
分类:
Web程序 时间:
2014-06-11 09:48:30
阅读次数:
1000
Incomputer science, aheapis a
specializedtree-baseddata structurethat satisfies theheap property:If A is a
parentnodeof B then the key of node A is or...
分类:
其他好文 时间:
2014-06-11 09:23:53
阅读次数:
376
在专业化的软件开发过程中,无论什么平台语言,现在都需要UnitTest单元测试.
Node.js有built-in的Assert。 今天让我们来看一下Node.js的单元测试。在这儿我们使用nodeunit, 通过NPM安装: npm
install nodeunit -g 支持命令行,浏览器运行....
分类:
Web程序 时间:
2014-06-10 00:11:06
阅读次数:
397
原文:js拾遗:appendChild
添加移动节点写js一年多了,一直以为自己很牛逼,开始写各种博文分享,昨天写了一篇《浅谈
IE下innerHTML导致的问题》在看了下面的评论,我才发现自己是多么无知。于是我回头翻阅了下 MDN,Node.appendChild
里面一开始就明确说了,“如果该节...
分类:
移动开发 时间:
2014-06-10 00:06:01
阅读次数:
296
原文:浅谈算法和数据结构: 九
平衡查找树之红黑树前面一篇文章介绍了2-3查找树,可以看到,2-3查找树能保证在插入元素之后能保持树的平衡状态,最坏情况下即所有的子节点都是2-node,树的高度为lgN,从而保证了最坏情况下的时间复杂度。但是2-3树实现起来比较复杂,本文介绍一种简单实现2-3树的数...
分类:
其他好文 时间:
2014-06-07 20:18:15
阅读次数:
364