From 13f525305d9ccfc3564ec2767323a64cbbc13743 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Thu, 25 Apr 2019 17:14:12 +0100 Subject: [PATCH] reformatting and correction of title --- subjects/reverserange.en.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 subjects/reverserange.en.md diff --git a/subjects/reverserange.en.md b/subjects/reverserange.en.md new file mode 100644 index 000000000..6e3a92b4f --- /dev/null +++ b/subjects/reverserange.en.md @@ -0,0 +1,24 @@ +## reverserange + +### Instructions + +Write the function ReverseRange which 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` !) +- finally return that array. + +### Expected function + +```go +func ReverseRange(start, end int) []int { + +} +``` + +Examples of output : + +- With (1, 3) the function will return an array containing 3, 2 and 1. +- With (-1, 2) the function will return an array containing 2, 1, 0 and -1. +- With (0, 0) the function will return an array containing 0. +- With (0, -3) the function will return an array containing -3, -2, -1 and 0.