challengerco.de — challenge yourself [BETA]
Login - Sign up

main / higher-than

Count values higher than given value

The Challenge

Write a function solve(limit, array) that will return the number of elements of the array that are larger than the limit.

Verifications

Sorted array (public)
solve(5, [1,2,3,4,5,6,7,8,9]) = 4

Unsorted array (public)
solve(10, [1, 100, 10, 11, 110, -5, 47]) = 4

Big array ~100,000 elements (private)
solve(?) = ?

Your Solution

Result: ???

Verification time:

Code size:

Published under the GPLv3 license
Fork challenger-code. Issues?