Package edu.cnm.deepdive
Class Palindromes
java.lang.Object
edu.cnm.deepdive.Palindromes
Implements recursive and iterative tests for reversibility (palindromic nature) of
String
instances.-
Method Summary
-
Method Details
-
recursive
Testsinput
to determine if it is a palindrome, using a recursive test.- Parameters:
input
-String
to be tested.- Returns:
true
ifinput
is a palindrome,false
otherwise.
-
iterative
Testsinput
to determine if it is a palindrome, using an iterative test.- Parameters:
input
-String
to be tested.- Returns:
true
ifinput
is a palindrome,false
otherwise.
-