Browse Source

Merge pull request #240 from 01-edu/fixlistsort

fix PrintList
content-update
augusto-mantilla 5 years ago committed by GitHub
parent
commit
076558e090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      subjects/listsort.en.md

15
subjects/listsort.en.md

@ -6,10 +6,6 @@ Write a function `ListSort` that sorts the linked list by ascending order.
- This time you only will have the `node` structure.
- Try to use recursive.
- Use pointers when ever you can.
### Expected function and structure
```go
@ -37,13 +33,12 @@ import (
)
func PrintList(l *piscine.NodeI) {
m := l
for m != nil {
fmt.Print(m.Data, " -> ")
m = m.Next
it := l
for it != nil {
fmt.Print(it.Data, " -> ")
it = it.Next
}
fmt.Print(nil)
fmt.Println()
fmt.Print(nil, "\n")
}
func listPushBack(l *piscine.NodeI, data int) *piscine.NodeI {

Loading…
Cancel
Save