Skip to content

Finds the 3 longest unique palindromes in any supplied string. For the 3 longest palindromes, report the palindrome, start index and length, in descending order of length. Given the input string: "A man, a plan, a canal, Panama!", the output should be: "Text: amanaplanacanalpanama, Index: 0, Length: 21"

Notifications You must be signed in to change notification settings

andresferreira/palindromes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Software Challenge

  • Solution is written in JAVA language using Apache MAVEN as a software project management tool;
  • The IDE used was IntelliJ IDEA: IntelliJ IDEA 2016.2.5
  • Junit tests were used to verify the correctness of a program's behaviour (see PalindromesTest.java);
  • File '.gitignore' was added since code should be maintainable, reusable and portable (usign git if needed for example).

TO RUN THE CODE:

  1. Please use an IDE(for example IntelliJ IDEA - to download see: https://www.jetbrains.com/idea/);
  2. Open the project, select pom.xml in 'Palindromes\pom.xml' path;
  3. Go to PalindromesMain.java to run the program.
  4. Run the main program
  5. You can change input String in the field 'inputString' and run again.
  6. For more details see runprogram.docx

Good: Easy to follow readme & instructions, Non-complicated code, Reasonable number/coverage of tests Bad: Main “utility” class should be static and not instantiated as an object Javadoc is half-complete, Tests are not generally focussed on the scenario / use case, instead feel a little random at times, Logic error in code, could result in more than 3 results being printed out

About

Finds the 3 longest unique palindromes in any supplied string. For the 3 longest palindromes, report the palindrome, start index and length, in descending order of length. Given the input string: "A man, a plan, a canal, Panama!", the output should be: "Text: amanaplanacanalpanama, Index: 0, Length: 21"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages