From d6611c11d355999f2e6cba832883be196c156f44 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Sun, 5 Mar 2017 21:09:28 +0100 Subject: [PATCH] - getting rid of min/max from avl tree for now, until we figure out if these should be implemented on all trees (probably, yes) --- trees/avltree/avltree.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/trees/avltree/avltree.go b/trees/avltree/avltree.go index d535ffc..cecb053 100644 --- a/trees/avltree/avltree.go +++ b/trees/avltree/avltree.go @@ -362,26 +362,6 @@ func (t *Tree) Right() *Node { return t.bottom(1) } -// Min returns the minimum key value pair of the AVL tree -// or nils if the tree is empty. -func (t *Tree) Min() (interface{}, interface{}) { - n := t.bottom(0) - if n == nil { - return nil, nil - } - return n.Key, n.Value -} - -// Max returns the minimum key value pair of the AVL tree -// or nils if the tree is empty. -func (t *Tree) Max() (interface{}, interface{}) { - n := t.bottom(1) - if n == nil { - return nil, nil - } - return n.Key, n.Value -} - func (t *Tree) bottom(d int) *Node { n := t.Root if n == nil {