neerajnanvani / PracticeGitAndJs

Its an practice repo to create pull request and use more github features
0 stars 10 forks source link

Reverse the array in k subsets #5

Open DASH0070 opened 2 years ago

DASH0070 commented 2 years ago

Complete the function reverseArray to reverse Array. Example array = [17, 12, 15, 8, 9, 10, 5, 1, 6] k = 4 output = [8, 15, 12, 17, 1, 5, 10, 9, 6] Function Description reverseArray has the following parameters: arr: array of input k: length of subset Returns: same arr as input with values modified