Adventures in Palindromes

William R. Mahoney

Research output: Contribution to specialist publicationArticle


An algorithm which used backtracking strategies for generating compiler grammar for a palindrome was developed. The entire code of the algorithm was 700 lines of C++ and used the STL for string handling. The algorithm was compiled and run on a true IBM PC, 1.4 GHz, running Red Hat Linux. The algorithm generated 33,582 palindromes from the dictionary, and implementation with a random number for the length of string to add, the algorithm generated 16,508 palindromes in about 33 minutes.

Original languageEnglish (US)
Number of pages4
Specialist publicationDr. Dobb's Journal
StatePublished - Apr 2004

ASJC Scopus subject areas

  • Software
  • Computer Networks and Communications


Dive into the research topics of 'Adventures in Palindromes'. Together they form a unique fingerprint.

Cite this