Challenge Information

Title : Reverse Sub-Array
Difficulty : Easy
Solutions : 3
Maximum Score : 50
Completed by You: No
Description :

You are given an array containing positive integers. Reverse every sub-array group of size X.

Write a function solve that have the following parameter(s):
1.) arr = array of integers
2.) X = integer to reverse sub-array

Example
Input:
arr = [10, 20, 30, 40, 50, 60]
X = 3
Output:
The function will return,
[30, 20, 10, 60, 50, 40]

Explanation
First group consists of elements [10,20,30]. Second group consists of [40,50,60].

Constraints

Judocode