btree: remove useless data
This commit is contained in:
parent
48e43c10eb
commit
5fccf8c6ec
@ -43,7 +43,7 @@ func TestTree_Remove(t *testing.T) {
|
|||||||
|
|
||||||
func TestTree_Insert(t *testing.T) {
|
func TestTree_Insert(t *testing.T) {
|
||||||
tree := NewBtree(3)
|
tree := NewBtree(3)
|
||||||
toInsert := []int{10, 20, 5, 6, 12, 30, 7, 17}
|
toInsert := []int{10, 20, 5, 6, 12, 30, 7, 17, 20}
|
||||||
|
|
||||||
// Test before insertion
|
// Test before insertion
|
||||||
for _, k := range toInsert {
|
for _, k := range toInsert {
|
||||||
@ -64,20 +64,6 @@ func TestTree_Insert(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
func TestTree_Traverse(t *testing.T) {
|
|
||||||
tree := NewBtree(3)
|
|
||||||
|
|
||||||
toInsert := []int{1, 3, 7, 10, 11, 13, 14, 15, 18, 16, 19, 24, 25, 26, 21, 4, 5, 20, 22, 2, 17, 12, 6}
|
|
||||||
for _, k := range toInsert {
|
|
||||||
tree.Insert(k)
|
|
||||||
}
|
|
||||||
|
|
||||||
tree.Traverse()
|
|
||||||
fmt.Println("\n 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 26")
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
func ExampleTree_Traverse() {
|
func ExampleTree_Traverse() {
|
||||||
tree := NewBtree(3)
|
tree := NewBtree(3)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user