Tail Recursion Assignment

From CSE425S Wiki
Jump to navigation Jump to search

Code To Implement

Reverse

class: Reverse.java Java.png
methods: reverse
package: tail.assignment
source folder: src/main/java

public static <E> ImmutableList<E> reverse(ImmutableList<E> original)

You will want to build a private static helper method which is tail recursive for reverse to invoke.

Test

class: ReverseTestSuite.java Junit.png
package: tail.assignment
source folder: src/test/java