|
|
@ -26,11 +26,16 @@ 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) |
|
|
|