refactor: rename Insert to InsertNode

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

No files matched your search

+1 -1
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 {