Exercise 2: Even Reversed

Write code to build an array consisting of the even elements of the input array in reverse order.

Problem statement

In this problem, you’ll first generate an array of even numbers out of the input array, and then reverse that array so that it appears in descending order. You can assume that the input array contains only integers.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy