This commit is contained in:
2019-05-07 18:28:45 +08:00
parent db935ea11f
commit ccb923e295
14 changed files with 322 additions and 1113 deletions

View File

@@ -117,6 +117,12 @@ func (tree *Tree) Remove(key interface{}) (interface{}, bool) {
return nil, false
}
func (tree *Tree) Clear() {
tree.size = 0
tree.root = nil
tree.iter = NewIteratorWithCap(nil, 16)
}
// Values 返回先序遍历的值
func (tree *Tree) Values() []interface{} {
mszie := 0