Skip to content

fazal60/ConvertStringToPalindrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program tries to make Palindromes out of strings using insertion.
Main Class has a driver method main() and two other methods for processing strings.

Inside Main() function:
Takes a string from user.
A check is performed to see if its already a palindrome using method checkPalindrome().
If its not then method convertToPalindrome() is called.
Prints the result.

Inside checkPalindrome():
Takes in a String as a parameter.
returns true if its already a Palindrome.

Inside convertToPalindrome()
Takes in the string as a parameter.
Determines how many insertions to make it Palindromic.
Then makes that change and returns a char[].

About

Convert a given String to Palindrome if its not already.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages