Problem
Given an array numbers consisting of integer elements, write a function solution that returns the length of numbers (i.e., the total number of elements).
Constraints
- Each element of
numbersis an integer between 0 and 500 inclusive. numbersis not empty and its length does not exceed 100.
Test Case
| Test Case Number | numbers | return |
|---|---|---|
| 1 | [0, 1, 2, 3, 4] | 5 |
| 2 | [500, 499, 498, 497, 496, 495, 494, 493, 492, 491] | 10 |
| 3 | [10] | 1 |
Explanation for Test Case 1
- Since
numberscontains 5 elements, the return value is5.
Explanation for Test Case 2
- Since
numberscontains 10 elements, the return value is10.
Explanation for Test Case 3
- Since
numberscontains 1 element, the return value is1.