© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
T. LaversLearn to Program with Kotlinhttps://doi.org/10.1007/978-1-4842-6815-5_12

12. Palindromes

Tim Lavers1  
(1)
Woonona, NSW, Australia
 

A palindrome is a word that is the same whether written forward or backward, for example, “kayak.” In this chapter, we will find all English words that are palindromes. This will give us further practice with object-oriented programming, unit testing, and recursion.

The classes we developed in the previous chapter are a great starting point for this project. Our implementation strategy will be based on adding an isPalindrome function to the Term class. We will then write a main function that loops through the words in the ...

Get Learn to Program with Kotlin: From the Basics to Projects with Text and Image Processing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.