Question: PLEASE ANSWER THESE IN JAVA TIME COMPLEXITY 1. [5 points) Write a recursive algorithm to reverse an array. (Hint: Study the textbook) 2. [5 points)
PLEASE ANSWER THESE
IN JAVA TIME COMPLEXITY

1. [5 points) Write a recursive algorithm to reverse an array. (Hint: Study the textbook) 2. [5 points) Write a recursive algorithm for finding the maximum element in an array A of n elements. 3. [5 points] Write a recursive algorithm for computing the nth Harmonic number defined as H, = (1/1) + (1/2) + ... + (1) 4. [5 points] Write a recursive algorithm for solving the element uniqueness problem which runs in 0(n?) in the worst case without using sorting. 5. [5 points) Write a recursive algorithm for reversing a singly linked list L, so that the ordering of the nodes becomes opposite of what it was before
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
