Let us consider the problem of reversing the n elements of an array, A, so that the first element becomes the last, the second element becomes the second to the last, and so on. We can solve this problem using the linear recursion, by observing that the reversal of an array can be achieved by swapping the first and last elements and then recursively reversing the remaining elements in the array.o Write a java method to reverse an array A.o Analyze the running time of your algorithm.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here