An open API service indexing awesome lists of open source software.

https://github.com/linabellbiu/tree

go实现的二叉树算法
https://github.com/linabellbiu/tree

Last synced: 2 months ago
JSON representation

go实现的二叉树算法

Awesome Lists containing this project

README

        

# Btree
### 基于golang实现的简单二叉树算法,用来比较树查找和for查找的速度
#### go run tree.go
1千万个数字查找9999这个数运行结果:
###### btree查找次数: 23
###### Run time: 0s
###### for查找次数: 5365902
###### Run time: 4.9856ms

#### createBtee 创建树
#### createLeaf 创建叶子
#### btreeFind 树查找
#### forFind 循环查找