refactor: rename Insert to InsertNode

This commit is contained in:
dudaodong
2022-03-01 10:11:37 +08:00
parent 9d5db895c9
commit dd1cbf2ee3
2 changed files with 18 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ func NewBSTree[T any](rootData T) *BSTree[T] {
}
// Insert data into BSTree
func (t *BSTree[T]) Insert(data T, comparator lancetconstraints.Comparator) {
func (t *BSTree[T]) InsertNode(data T, comparator lancetconstraints.Comparator) {
root := t.root
newNode := datastructure.NewTreeNode(data)
if root == nil {