From 069c375205efa4b8ca6b62df7b091ba5a2b6a41c Mon Sep 17 00:00:00 2001 From: lee Date: Wed, 26 Jun 2019 14:21:20 +0100 Subject: [PATCH] fix Nodee to NodeI --- subjects/listsort.en.md | 16 ++++++++-------- subjects/listsort.fr.md | 14 +++++++------- subjects/sortedlistmerge.en.md | 14 +++++++------- subjects/sortedlistmerge.fr.md | 14 +++++++------- subjects/sortlistinsert.en.md | 12 ++++++------ subjects/sortlistinsert.fr.md | 12 ++++++------ 6 files changed, 41 insertions(+), 41 deletions(-) diff --git a/subjects/listsort.en.md b/subjects/listsort.en.md index 7672ad54..44ec9e2a 100644 --- a/subjects/listsort.en.md +++ b/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) diff --git a/subjects/listsort.fr.md b/subjects/listsort.fr.md index 7672ad54..c146d367 100644 --- a/subjects/listsort.fr.md +++ b/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) diff --git a/subjects/sortedlistmerge.en.md b/subjects/sortedlistmerge.en.md index 8db19ee1..db9a3b10 100644 --- a/subjects/sortedlistmerge.en.md +++ b/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 diff --git a/subjects/sortedlistmerge.fr.md b/subjects/sortedlistmerge.fr.md index 8db19ee1..db9a3b10 100644 --- a/subjects/sortedlistmerge.fr.md +++ b/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 diff --git a/subjects/sortlistinsert.en.md b/subjects/sortlistinsert.en.md index 8b6ab31b..285ea95d 100644 --- a/subjects/sortlistinsert.en.md +++ b/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) diff --git a/subjects/sortlistinsert.fr.md b/subjects/sortlistinsert.fr.md index 8b6ab31b..285ea95d 100644 --- a/subjects/sortlistinsert.fr.md +++ b/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)