Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

majiang-java/BinarySearchST

Repository files navigation

Build Status

BinarySearchST

基于二分查找的有序表,在做topK算法的给力实现

通过javascript实现,这个表是整个体系的一部分,所有复杂的结构都是基于这个数据结构实现.理论上要比一般顺序表做查询是无序数组的1/4

最坏查找时间为lgN ,插入为2N, 平均成本查找lgN 插入为N

quickly to start

git clone

npm test

直接调用

var bst = new BinarySearchST();
		
for(var i = 0 ; i <1000; i++){
	bst.put(i,i);
}
console.log(bst.get(888)); //测试
console.log(bst.del(666));
console.log(bst.get(666));
console.log(bst.get(888));

About

二分有序表

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /