Browse Source

Merge pull request #239 from 01-edu/fix-btreeapplypostorder

remove inconsistencies on the main
content-update
augusto-mantilla 5 years ago committed by GitHub
parent
commit
27d0207973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      subjects/btreeapplypostorder.en.md

12
subjects/btreeapplypostorder.en.md

@ -7,7 +7,7 @@ Write a function that applies a function using a postorder walk to each element
### Expected function ### Expected function
```go ```go
func BTreeApplyPostorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) { func BTreeApplyPostorder(root *TreeNode, f func(...interface{}) (int, error)) {
} }
``` ```
@ -21,7 +21,7 @@ package main
import ( import (
"fmt" "fmt"
piscine "." piscine ".."
) )
func main() { func main() {
@ -29,7 +29,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")
BTreeApplyPostorder(root, fmt.Println) piscine.BTreeApplyPostorder(root, fmt.Println)
} }
``` ```
@ -37,11 +37,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
5 5
7 7
4 4
student@ubuntu:~/piscine/btreeinsertdata$ student@ubuntu:~/piscine/test$
``` ```

Loading…
Cancel
Save