Find any atomic or permuted palindrome in any given file.
Atomic palindrome example: "civic"
!Atomic palindrome example: "A nut for a jar of tuna"
Piet Hein
Improve my c++ skills implementing something meaningful.
Well, I tried the most apply programming good practices, clean code principles and problem solving attitude(i.e. rack your brains). So, yes.
Programming Principles And Practice Using C++ - Second Edition
By the great, Bjarne Stroustrup C++ creator.
Specify the file name properly placed at artifacts
folder when instantiate a palindrome object like so:
#include "src/palindrome.h"
int main(int argc, char const *argv[]) {
Palindrome palindrome = { "the-tragedy-of-hamlet-by-w-shakspeare.txt" };
palindrome.readWordsFromFile();
}
Run it Forest, run..
g++ src/palindrome.cpp main.cpp -o <output file name>
Expected output:
did is The Permuted Palindrome #435
too is The Permuted Palindrome #436
bee is The Permuted Palindrome #437
offendendo is The Permuted Palindrome #438
bee is The Permuted Palindrome #439
hee is The Permuted Palindrome #440