mirror of https://github.com/01-edu/public.git
docs(go quest 11): correct grammar of NodeI exercises
There are still some improvements to make - but we will make those after the current round of in progress selection piscines
This commit is contained in:
parent
4c65e9e273
commit
266a3a941d
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
Write a function `ListSort` that sorts the nodes of a linked list by ascending order.
|
Write a function `ListSort` that sorts the nodes of a linked list by ascending order.
|
||||||
|
|
||||||
- The `NodeI` structure will be the only one used.
|
|
||||||
|
|
||||||
### Expected function and structure
|
### Expected function and structure
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
@ -19,6 +17,8 @@ func ListSort(l *NodeI) *NodeI {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> You will use **this** `NodeI` structure in subsequent exercises.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Here is a possible program to test your function :
|
Here is a possible program to test your function :
|
||||||
|
|
|
@ -14,6 +14,8 @@ func SortedListMerge(n1 *NodeI, n2 *NodeI) *NodeI {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> You have already defined the `NodeI` structure in the `listsort` exercise.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Here is a possible program to test your function :
|
Here is a possible program to test your function :
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
### Instructions
|
### Instructions
|
||||||
|
|
||||||
Write a function `SortListInsert` that inserts `data_ref` in the linked list `l` while keeping the list sorted in ascending order.
|
Create a function named `SortListInsert`, which accepts a pointer to the head of a _sorted_ linked list and an integer.
|
||||||
|
|
||||||
- During the tests the list passed as an argument will be already sorted.
|
The function should insert a new element into the list, with its `Data` set to the value of the integer. The element should be inserted so that the linked list remains sorted in ascending order by `Data`. The function should return the head of the list.
|
||||||
|
|
||||||
|
Your function will only be tested with sorted linked lists.
|
||||||
|
|
||||||
### Expected function and structure
|
### Expected function and structure
|
||||||
|
|
||||||
|
@ -14,6 +16,8 @@ func SortListInsert(l *NodeI, data_ref int) *NodeI{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> You have already defined the `NodeI` structure in the `listsort` exercise.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Here is a possible program to test your function :
|
Here is a possible program to test your function :
|
||||||
|
|
Loading…
Reference in New Issue