转载自百度空间location.hashlocation对象:设置或获取当前URL的信息使用location对象可以设置或返回URL中的一些信息,一个完整的URL地址的格式为:协议://主机:端口/路径名称#hash标识?搜索条件其中,协议是URL的起始部分,用于指定该URL地
址所采用的通信协议,...
分类:
其他好文 时间:
2014-05-24 07:41:08
阅读次数:
237
1.1
实现一个算法,确定一个字符串的所有字符是否全都不同。不允许使用额外的数据结构。解答:这里假定字符集为ASCII码,可以与面试官沟通确认字符串使用的字符集。由于字符集是有限的,建立一个数组模拟的Hash表记录每个字符是否出现,线性扫描一次字符串即可,复杂度O(len(s)).如果字符集较大,需...
分类:
编程语言 时间:
2014-05-24 04:11:56
阅读次数:
350
概述 哈夫曼树:树的带权路径长度达到最小。 构造规则 1. 将w1、w2、…,wn看成是有n
棵树的森林(每棵树仅有一个结点); 2.
在森林中选出根结点的权值最小的两棵树进行合并,作为一棵新树的左、右子树,且新树的根结点权值为其左、右子树根结点权值之和; 3.
从森林中删除选取的两棵树,并将新树加...
分类:
其他好文 时间:
2014-05-24 02:49:48
阅读次数:
257
1、tree需要显示多个图标 实际需求:设备树上节点需搁三个图片,分别标识运行状态、告警状态、设备类型
解决方法:给tree的iconCls传入一个数组,分别是各状态下的class(css),然后要改动easyui关于tree节点组装部分的代码
if(item.iconC...
分类:
Web程序 时间:
2014-05-23 23:27:35
阅读次数:
446
题目:Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identical...
分类:
其他好文 时间:
2014-05-23 12:40:21
阅读次数:
352
题目: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 onl...
分类:
其他好文 时间:
2014-05-23 12:20:50
阅读次数:
407
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-05-23 11:54:10
阅读次数:
317
题目: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 ...
分类:
其他好文 时间:
2014-05-23 11:31:51
阅读次数:
299
Construct Binary Tree from Preorder and Inorder
TraversalGiven preorder and inorder traversal of a tree, construct the binary
tree.Note:You may assume...
分类:
其他好文 时间:
2014-05-19 18:43:40
阅读次数:
177
创建目录服务器实例之后,必须为服务器的目录信息树(Directory Information
Tree,DIT)创建一个或多个后缀。DIT由服务器中的所有条目组成,这些条目使用各自的标识名(DistinguishedName,DN)进行标识。DN的分层特性可创建分支和叶条目,从而以树的形式组织数据。...
分类:
其他好文 时间:
2014-05-19 13:39:17
阅读次数:
329