7 kyu
Even numbers in an array
2,503 of 21,672Dmitry Kudla
Description:
Given an array
of numbers, return a new array of length number
containing the last even numbers from the original array (in the same order). The original array will be not empty and will contain at least "number" even numbers.
For example:
([1, 2, 3, 4, 5, 6, 7, 8, 9], 3) => [4, 6, 8]
([-22, 5, 3, 11, 26, -6, -7, -8, -9, -8, 26], 2) => [-8, 26]
([6, -25, 3, 7, 5, 5, 7, -3, 23], 1) => [6]
Fundamentals
Arrays
Similar Kata:
Stats:
Created | Dec 27, 2017 |
Published | Dec 27, 2017 |
Warriors Trained | 29287 |
Total Skips | 1495 |
Total Code Submissions | 56364 |
Total Times Completed | 21672 |
JavaScript Completions | 9425 |
Haskell Completions | 257 |
Ruby Completions | 556 |
Python Completions | 6499 |
C++ Completions | 2503 |
Crystal Completions | 18 |
Rust Completions | 658 |
TypeScript Completions | 603 |
Kotlin Completions | 991 |
Dart Completions | 620 |
COBOL Completions | 10 |
CoffeeScript Completions | 17 |
D Completions | 5 |
Lua Completions | 31 |
Julia Completions | 7 |
Prolog Completions | 9 |
Java Completions | 112 |
Total Stars | 187 |
% of votes with a positive feedback rating | 94% of 2380 |
Total "Very Satisfied" Votes | 2097 |
Total "Somewhat Satisfied" Votes | 260 |
Total "Not Satisfied" Votes | 23 |
Total Rank Assessments | 6 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |