News

Function gets called as reverseRecursive (arr, 0, len-1); In each recursive iteration swap arr [start] & arr [end] Make further recursive calls as reverseRecursive (arr, start + 1, end – 1); return ...
Run a loop till i < j swap (arr [i], arr [j]) Increment i and decrement the j Now, Print the array Time and Space Complexity : Time Complexity : O (n) Space Complexity : O (1) Reverse elements of an ...