https://github.com/linabellbiu/tree
go实现的二叉树算法
https://github.com/linabellbiu/tree
Last synced: 2 months ago
JSON representation
go实现的二叉树算法
- Host: GitHub
- URL: https://github.com/linabellbiu/tree
- Owner: linabellbiu
- Created: 2019-04-29T13:19:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-30T03:33:49.000Z (about 6 years ago)
- Last Synced: 2025-02-15T16:55:45.461Z (4 months ago)
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 循环查找