Question: This is in java. We cannot import any packages to solve this problem.THANK YOU! 17 01 public static int[] reverseEvenNumber(int[] arr) For any given integer
This is in java. We cannot import any packages to solve this problem.THANK YOU!

17 01 public static int[] reverseEvenNumber(int[] arr) For any given integer array arr[], reverse the order of only the even numbers while the odd number stays in the same position. The method returns the reversed array. For example: Input : [1, 2, 4, 8, 9, , 10] Output: [1, 10, 8, 4, 9, 2] You may not assume that all even numbers always occur in the indices given in the example. Your method should work in another generic array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
