Return the index of the last even integer in the given array arr. If there's no even number, return -1.
Examples
Example 1
Input: [1, 3, 2, 4, 5]
Output: 3
The last even number is 4 at index 3
Example 2
Input: [1, 3, 5]
Output: -1
No even numbers in the array
Example 3
Input: [2]
Output: 0
Single even number at index 0
Constraints
- Array contains at least 1 element
- Return -1 if no even numbers exist
- Even numbers are divisible by 2