Browse Source

fix Nodee to NodeI

content-update
lee 5 years ago
parent
commit
069c375205
  1. 16
      subjects/listsort.en.md
  2. 14
      subjects/listsort.fr.md
  3. 14
      subjects/sortedlistmerge.en.md
  4. 14
      subjects/sortedlistmerge.fr.md
  5. 12
      subjects/sortlistinsert.en.md
  6. 12
      subjects/sortlistinsert.fr.md

16
subjects/listsort.en.md

@ -1,4 +1,4 @@
## listpushback
## listsort
### Instructions
@ -13,12 +13,12 @@ Write a function `ListSort` that sorts the linked list by ascending order.
### Expected function and structure
```go
type Nodee struct {
type NodeI struct {
Data int
Next *Nodee
Next *NodeI
}
func ListSort(l *Nodee) *Nodee {
func ListSort(l *NodeI) *NodeI {
}
```
@ -36,7 +36,7 @@ import (
piscine ".."
)
func PrintList(l *piscine.Nodee) {
func PrintList(l *piscine.NodeI) {
m := l
for m != nil {
fmt.Print(m.Data, " -> ")
@ -46,8 +46,8 @@ func PrintList(l *piscine.Nodee) {
fmt.Println()
}
func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
n := &piscine.Nodee{Data: data}
func listPushBack(l *piscine.NodeI, data int) *piscine.NodeI {
n := &piscine.NodeI{Data: data}
if l == nil {
return n
@ -61,7 +61,7 @@ func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
}
func main() {
var link *piscine.Nodee
var link *piscine.NodeI
link = listPushBack(link, 5)
link = listPushBack(link, 4)

14
subjects/listsort.fr.md

@ -13,12 +13,12 @@ Write a function `ListSort` that sorts the linked list by ascending order.
### Expected function and structure
```go
type Nodee struct {
type NodeI struct {
Data int
Next *Nodee
Next *NodeI
}
func ListSort(l *Nodee) *Nodee {
func ListSort(l *NodeI) *NodeI {
}
```
@ -36,7 +36,7 @@ import (
piscine ".."
)
func PrintList(l *piscine.Nodee) {
func PrintList(l *piscine.NodeI) {
m := l
for m != nil {
fmt.Print(m.Data, " -> ")
@ -46,8 +46,8 @@ func PrintList(l *piscine.Nodee) {
fmt.Println()
}
func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
n := &piscine.Nodee{Data: data}
func listPushBack(l *piscine.NodeI, data int) *piscine.NodeI {
n := &piscine.NodeI{Data: data}
if l == nil {
return n
@ -61,7 +61,7 @@ func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
}
func main() {
var link *piscine.Nodee
var link *piscine.NodeI
link = listPushBack(link, 5)
link = listPushBack(link, 4)

14
subjects/sortedlistmerge.en.md

@ -1,4 +1,4 @@
## listpushback
## sortedlistmerge
### Instructions
@ -11,7 +11,7 @@ Write a function `SortedListMerge` that mereges two lists, `n1` and `n2`, but it
### Expected function and structure
```go
func SortedListMerge(n1 *Nodee, n2 *Nodee) *Nodee {
func SortedListMerge(n1 *NodeI, n2 *NodeI) *NodeI {
}
```
@ -29,10 +29,10 @@ import (
piscine ".."
)
type node = piscine.Nodee
type nodes = piscine.Nodee
type node = piscine.NodeI
type nodes = piscine.NodeI
func PrintList(l *piscine.Nodee) {
func PrintList(l *piscine.NodeI) {
m := l
for m != nil {
fmt.Print(m.Data, " -> ")
@ -42,8 +42,8 @@ func PrintList(l *piscine.Nodee) {
fmt.Println()
}
func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
n := &piscine.Nodee{Data: data}
func listPushBack(l *piscine.NodeI, data int) *piscine.NodeI {
n := &piscine.NodeI{Data: data}
if l == nil {
return n

14
subjects/sortedlistmerge.fr.md

@ -1,4 +1,4 @@
## listpushback
## sortedlistmerge
### Instructions
@ -11,7 +11,7 @@ Write a function `SortedListMerge` that mereges two lists, `n1` and `n2`, but it
### Expected function and structure
```go
func SortedListMerge(n1 *Nodee, n2 *Nodee) *Nodee {
func SortedListMerge(n1 *NodeI, n2 *NodeI) *NodeI {
}
```
@ -29,10 +29,10 @@ import (
piscine ".."
)
type node = piscine.Nodee
type nodes = piscine.Nodee
type node = piscine.NodeI
type nodes = piscine.NodeI
func PrintList(l *piscine.Nodee) {
func PrintList(l *piscine.NodeI) {
m := l
for m != nil {
fmt.Print(m.Data, " -> ")
@ -42,8 +42,8 @@ func PrintList(l *piscine.Nodee) {
fmt.Println()
}
func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
n := &piscine.Nodee{Data: data}
func listPushBack(l *piscine.NodeI, data int) *piscine.NodeI {
n := &piscine.NodeI{Data: data}
if l == nil {
return n

12
subjects/sortlistinsert.en.md

@ -1,4 +1,4 @@
## listpushback
## sortlistinsert
### Instructions
@ -11,7 +11,7 @@ Write a function `SortListInsert` that inserts `data_ref` in the linked list, bu
### Expected function and structure
```go
func SortListInsert(l *Nodee, data_ref int) *Nodee{
func SortListInsert(l *NodeI, data_ref int) *NodeI{
}
```
@ -29,7 +29,7 @@ import (
piscine ".."
)
func PrintList(l *piscine.Nodee) {
func PrintList(l *piscine.NodeI) {
m := l
for m != nil {
fmt.Print(m.Data, " -> ")
@ -39,8 +39,8 @@ func PrintList(l *piscine.Nodee) {
fmt.Println()
}
func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
n := &piscine.Nodee{Data: data}
func listPushBack(l *piscine.NodeI, data int) *piscine.NodeI {
n := &piscine.NodeI{Data: data}
if l == nil {
return n
@ -55,7 +55,7 @@ func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
func main() {
var link *piscine.Nodee
var link *piscine.NodeI
link = listPushBack(link, 1)
link = listPushBack(link, 4)

12
subjects/sortlistinsert.fr.md

@ -1,4 +1,4 @@
## listpushback
## sortlistinsert
### Instructions
@ -11,7 +11,7 @@ Write a function `SortListInsert` that inserts `data_ref` in the linked list, bu
### Expected function and structure
```go
func SortListInsert(l *Nodee, data_ref int) *Nodee{
func SortListInsert(l *NodeI, data_ref int) *NodeI{
}
```
@ -29,7 +29,7 @@ import (
piscine ".."
)
func PrintList(l *piscine.Nodee) {
func PrintList(l *piscine.NodeI) {
m := l
for m != nil {
fmt.Print(m.Data, " -> ")
@ -39,8 +39,8 @@ func PrintList(l *piscine.Nodee) {
fmt.Println()
}
func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
n := &piscine.Nodee{Data: data}
func listPushBack(l *piscine.NodeI, data int) *piscine.NodeI {
n := &piscine.NodeI{Data: data}
if l == nil {
return n
@ -55,7 +55,7 @@ func listPushBack(l *piscine.Nodee, data int) *piscine.Nodee {
func main() {
var link *piscine.Nodee
var link *piscine.NodeI
link = listPushBack(link, 1)
link = listPushBack(link, 4)

Loading…
Cancel
Save