Question 2 How to Attempt? Reverse an Array Write a function that returns the reverse of the input array. Input Specific
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 2 How to Attempt? Reverse an Array Write a function that returns the reverse of the input array. Input Specific
Question 2 How to Attempt? Reverse an Array Write a function that returns the reverse of the input array. Input Specification: input1: an array of numbers input2: length of the array (input1) Output Specification: Return an array in reverse order. Example 1 input1: (1,2,3) input2: 3 Output: 3,2,1) Explanation: The reverse of array (1,2,3) would be (3,2,1). Example 2 input1: (2,5,6,0.1) input2: 5 Output: (1.065,2) Explanation: The reverse of array (25,6,0,1) would be (1,0,6,5,2).
THONS MN MYSUP 0 0 0 1 3 2 # Read only region start class UserMainCode(object): 7 9 Attempted: 0/4 JNM ¶ 2 Compiler: Python 3.6 @classmethod def reverse(cls, input1, input2): input1: int[] input2 : int Expected return type: int[] LEE # Read only region end #Write code here pass