refactor: change function name

This commit is contained in:
dudaodong committed 2022-06-07 13:48:32 +08:00
1 parent 6f17ba9116
commit 07d04a9cd0
2 files changed
+41 -41

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@ func NewBSTree[T any](rootData T, comparator lancetconstraints.Comparator) *BSTr
}
// InsertNode insert data into BSTree
func (t *BSTree[T]) InsertNode(data T) {
func (t *BSTree[T]) Insert(data T) {
root := t.root
newNode := datastructure.NewTreeNode(data)
if root == nil {
@@ -35,7 +35,7 @@ func (t *BSTree[T]) InsertNode(data T) {
}
// DeletetNode delete data into BSTree
func (t *BSTree[T]) DeletetNode(data T) {
func (t *BSTree[T]) Delete(data T) {
deleteTreeNode(t.root, data, t.comparator)
}