mirror of https://github.com/01-edu/public.git
Augusto
6 years ago
committed by
Frenchris
1 changed files with 25 additions and 0 deletions
@ -0,0 +1,25 @@
|
||||
# reverserange |
||||
## Instructions |
||||
|
||||
Write the function ReverseRange, it must allocate (with make()) an array of integers, fill it with consecutive |
||||
values that begin at end and end at start (Including start and end !), then |
||||
return that array. |
||||
|
||||
This function must be declare as follows |
||||
|
||||
## Expected function |
||||
|
||||
```go |
||||
|
||||
func ReverseRange(start, end int) []int { |
||||
|
||||
} |
||||
|
||||
``` |
||||
|
||||
And its output : |
||||
|
||||
- With (1, 3) you will return an array containing 3, 2 and 1 |
||||
- With (-1, 2) you will return an array containing 2, 1, 0 and -1. |
||||
- With (0, 0) you will return an array containing 0. |
||||
- With (0, -3) you will return an array containing -3, -2, -1 and 0. |
Loading…
Reference in new issue