Browse Source

fix writing problems

content-update
lee 5 years ago
parent
commit
7ec29d8304
  1. 14
      subjects/listpushfront.en.md
  2. 14
      subjects/listpushfront.fr.md

14
subjects/listpushfront.en.md

@ -1,8 +1,8 @@
## listpushback
## listpushfront
### Instructions
Write a function `ListPushBack` that inserts a new element `NodeL` at the beginning of the list `l` while using the structure `List`
Write a function `ListPushFront` that inserts a new element `NodeL` at the beginning of the list `l` while using the structure `List`
### Expected function and structure
@ -29,8 +29,9 @@ Here is a possible [program](TODO-LINK) to test your function :
package main
import (
piscine ".."
"fmt"
piscine ".."
)
func main() {
@ -43,9 +44,10 @@ func main() {
it := link.Head
for it != nil {
fmt.Println(it.Data)
fmt.Print(it.Data, " ")
it = it.Next
}
fmt.Println()
}
```
@ -54,8 +56,6 @@ And its output :
```console
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
how are you
man
Hello
how are you man Hello
student@ubuntu:~/piscine/test$
```

14
subjects/listpushfront.fr.md

@ -1,8 +1,8 @@
## listpushback
## listpushfront
### Instructions
Écrire une fonction `ListPushBack` qui insère un nouvel élément `NodeL` au début de la liste `l` en utilisant la structure `List`.
Écrire une fonction `ListPushFront` qui insère un nouvel élément `NodeL` au début de la liste `l` en utilisant la structure `List`.
### Fonction et structue attendues
@ -29,8 +29,9 @@ Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
package main
import (
piscine ".."
"fmt"
piscine ".."
)
func main() {
@ -43,9 +44,10 @@ func main() {
it := link.Head
for it != nil {
fmt.Println(it.Data)
fmt.Print(it.Data, " ")
it = it.Next
}
fmt.Println()
}
```
@ -54,8 +56,6 @@ Et son résultat :
```console
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
how are you
man
Hello
how are you man Hello
student@ubuntu:~/piscine/test$
```

Loading…
Cancel
Save