Browse Source

fix readme from btreelevelcount from quest 12

pull/214/head
lee 5 years ago
parent
commit
ebbda76a9b
  1. 21
      subjects/btreelevelcount.en.md
  2. 21
      subjects/btreelevelcount.fr.md

21
subjects/btreelevelcount.en.md

@ -7,7 +7,7 @@ Write a function, BTreeLevelCount, that return the number of levels of the tree
### Expected function
```go
func BTreeLevelCount(root *piscine.TreeNode) int {
func BTreeLevelCount(root *TreeNode) int {
}
```
@ -21,23 +21,24 @@ package main
import (
"fmt"
student ".."
piscine ".."
)
func main() {
root := &student.TreeNode{Data: "4"}
student.BTreeInsertData(root, "1")
student.BTreeInsertData(root, "7")
student.BTreeInsertData(root, "5")
fmt.Println(BTreeLevelCount(root))
root := &piscine.TreeNode{Data: "4"}
piscine.BTreeInsertData(root, "1")
piscine.BTreeInsertData(root, "7")
piscine.BTreeInsertData(root, "5")
fmt.Println(piscine.BTreeLevelCount(root))
}
```
And its output :
```console
student@ubuntu:~/student/btreesearchitem$ go build
student@ubuntu:~/student/btreesearchitem$ ./btreesearchitem
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
3
student@ubuntu:~/student/btreesearchitem$
student@ubuntu:~/student/test$
```

21
subjects/btreelevelcount.fr.md

@ -7,7 +7,7 @@ Write a function, BTreeLevelCount, that return the number of levels of the tree
### Expected function
```go
func BTreeLevelCount(root *piscine.TreeNode) int {
func BTreeLevelCount(root *TreeNode) int {
}
```
@ -21,23 +21,24 @@ package main
import (
"fmt"
student ".."
piscine ".."
)
func main() {
root := &student.TreeNode{Data: "4"}
student.BTreeInsertData(root, "1")
student.BTreeInsertData(root, "7")
student.BTreeInsertData(root, "5")
fmt.Println(BTreeLevelCount(root))
root := &piscine.TreeNode{Data: "4"}
piscine.BTreeInsertData(root, "1")
piscine.BTreeInsertData(root, "7")
piscine.BTreeInsertData(root, "5")
fmt.Println(piscine.BTreeLevelCount(root))
}
```
And its output :
```console
student@ubuntu:~/student/btreesearchitem$ go build
student@ubuntu:~/student/btreesearchitem$ ./btreesearchitem
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
3
student@ubuntu:~/student/btreesearchitem$
student@ubuntu:~/student/test$
```

Loading…
Cancel
Save