kotlin-coding-challenges

Count down

Instructions

Given positive integer n implement a function which returns a list containing all steps from n to 0.

Challenge Solution

Examples

countDown(1) // [1, 0]

countDown(4) // [4, 3, 2, 1, 0]