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 language||English (US)|
|Number of pages||4|
|Specialist publication||Dr. Dobb's Journal|
|State||Published - Apr 2004|
ASJC Scopus subject areas
- Computer Networks and Communications