|
|
@ -26,15 +26,20 @@ Here is a possible [program](TODO-LINK) to test your function : |
|
|
|
```go |
|
|
|
```go |
|
|
|
package main |
|
|
|
package main |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
|
|
|
"fmt" |
|
|
|
|
|
|
|
piscine ".." |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
|
root := &TreeNode{data: "4"} |
|
|
|
root := &piscine.TreeNode{Data: "4"} |
|
|
|
BTreeInsertData(root, "1") |
|
|
|
piscine.BTreeInsertData(root, "1") |
|
|
|
BTreeInsertData(root, "7") |
|
|
|
piscine.BTreeInsertData(root, "7") |
|
|
|
BTreeInsertData(root, "5") |
|
|
|
piscine.BTreeInsertData(root, "5") |
|
|
|
fmt.Println(root.left.data) |
|
|
|
fmt.Println(root.Left.Data) |
|
|
|
fmt.Println(root.data) |
|
|
|
fmt.Println(root.Data) |
|
|
|
fmt.Println(root.right.left.data) |
|
|
|
fmt.Println(root.Right.Left.Data) |
|
|
|
fmt.Println(root.right.data) |
|
|
|
fmt.Println(root.Right.Data) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
``` |
|
|
|