Challenge overview
Hello and welcome to the challenge!
Write a code which counts all elements in the given array and its subarrays (counting subarrays too).
Example
app.count([1,2,[3,4]]) -> 5 (four numbers and one subarray)
Input
- multi-level array
Output
- amount of items - integer number
N
Constraints
0 < N < 2000
You can solve this programming contest in Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other Challenges. Below you can find some of them:
Have fun and good luck! :)