Question: 4a) Design an efficient algorithm to reverse a list. For example, the reverse of the list of strings L L: design, polynomial, prime, algorithm, Josephus
4a) Design an efficient algorithm to reverse a list. For example, the reverse of the list of strings L L: design, polynomial, prime, algorithm, Josephus is the list RL: RL: Josephus, algorithm, prime, polynomial, design Your design should be at least one paragraph with several sentences. b) Provide pseudo code for your algorithm for the method not in the class AList< T > with the following signature:
/** Reverse the items in the AList parameter. @param list an ALis< T > object @return an AList< T > object thia is the reversr of the parameter */ public AList< T > reverseList< AList< T > list )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
