1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-13 01:02:28 +08:00

refactor: change function name

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

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)
}