Browse Source

fix readme BtreeApllyInOrder

pull/201/head
lee 5 years ago
parent
commit
b9a2ad00fc
  1. 12
      subjects/btreeapplyinorder.en.md
  2. 12
      subjects/btreeapplyinorder.fr.md

12
subjects/btreeapplyinorder.en.md

@ -8,7 +8,7 @@ Write a function that applies a function in order to each element in the tree
### Expected function ### Expected function
```go ```go
func BTreeApplyInorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) { func BTreeApplyInorder(root *TreeNode, f func(...interface{}) (int, error)) {
} }
``` ```
@ -22,7 +22,7 @@ package main
import ( import (
"fmt" "fmt"
piscine "." piscine ".."
) )
func main() { func main() {
@ -30,7 +30,7 @@ func main() {
piscine.BTreeInsertData(root, "1") piscine.BTreeInsertData(root, "1")
piscine.BTreeInsertData(root, "7") piscine.BTreeInsertData(root, "7")
piscine.BTreeInsertData(root, "5") piscine.BTreeInsertData(root, "5")
BTreeApplyInorder(root, fmt.Println) piscine.BTreeApplyInorder(root, fmt.Println)
} }
``` ```
@ -38,11 +38,11 @@ func main() {
And its output : And its output :
```console ```console
student@ubuntu:~/piscine/btreeinsertdata$ go build student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/btreeinsertdata$ ./btreeinsertdata student@ubuntu:~/piscine/test$ ./test
1 1
4 4
5 5
7 7
student@ubuntu:~/piscine/btreeinsertdata$ student@ubuntu:~/piscine/test$
``` ```

12
subjects/btreeapplyinorder.fr.md

@ -8,7 +8,7 @@ Write a function that applies a function in order to each element in the tree
### Expected function ### Expected function
```go ```go
func BTreeApplyInorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) { func BTreeApplyInorder(root *TreeNode, f func(...interface{}) (int, error)) {
} }
``` ```
@ -22,7 +22,7 @@ package main
import ( import (
"fmt" "fmt"
piscine "." piscine ".."
) )
func main() { func main() {
@ -30,7 +30,7 @@ func main() {
piscine.BTreeInsertData(root, "1") piscine.BTreeInsertData(root, "1")
piscine.BTreeInsertData(root, "7") piscine.BTreeInsertData(root, "7")
piscine.BTreeInsertData(root, "5") piscine.BTreeInsertData(root, "5")
BTreeApplyInorder(root, fmt.Println) piscine.BTreeApplyInorder(root, fmt.Println)
} }
``` ```
@ -38,11 +38,11 @@ func main() {
And its output : And its output :
```console ```console
student@ubuntu:~/piscine/btreeinsertdata$ go build student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/btreeinsertdata$ ./btreeinsertdata student@ubuntu:~/piscine/test$ ./test
1 1
4 4
5 5
7 7
student@ubuntu:~/piscine/btreeinsertdata$ student@ubuntu:~/piscine/test$
``` ```

Loading…
Cancel
Save