8 kyu
Generate range of integers
16,883 of 26,577XxxX88
Description:
Implement the function generateRange
which takes three arguments (start, stop, step)
and returns the range of integers from start
to stop
(inclusive) in increments of step
.
Examples
(1, 10, 1) -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
(-10, 1, 1) -> [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1]
(1, 15, 20) -> [1]
Note
- start < stop
- step > 0
Algorithms
Similar Kata:
Stats:
Created | Sep 6, 2015 |
Published | Sep 6, 2015 |
Warriors Trained | 35666 |
Total Skips | 480 |
Total Code Submissions | 75926 |
Total Times Completed | 26577 |
JavaScript Completions | 16883 |
Elixir Completions | 240 |
C# Completions | 2168 |
Racket Completions | 45 |
Rust Completions | 683 |
C Completions | 613 |
Prolog Completions | 32 |
Ruby Completions | 650 |
Nim Completions | 36 |
Julia Completions | 48 |
Python Completions | 5628 |
NASM Completions | 16 |
CoffeeScript Completions | 13 |
Scala Completions | 21 |
Java Completions | 206 |
Total Stars | 290 |
% of votes with a positive feedback rating | 93% of 3175 |
Total "Very Satisfied" Votes | 2777 |
Total "Somewhat Satisfied" Votes | 358 |
Total "Not Satisfied" Votes | 40 |