Have the function String Challenge (str)
take the str parameter being passed and
determine if it is possible to create a
palindromic string of minimum length 3
characters by removing 1 or 2 characters. For
example: if stris "abjchba" then you can
remove the characters jc to produce "abhba"
which is a palindrome. For this example your
program should return the two characters that
were removed with no delimiter and in the
order they appear in the string, so jc. If 1 or 2
characters cannot be removed to produce a
palindiome, then return the string not possible.
If the input string is already a palindrome, your
program should return the string palindrome.
Your program should always remove the
characters that appear earlier in the string. In
the example above, you can also remove ch to
form a palindrome butic appears first, so the
correct answer is jc:
The input will only contain lower alphabetical characters.
Answers
Answered by
6
Answer:
this the answer I am writing is very hard to write and finnd from the world of Microsoft word and the answer is no 1 haldwani mod in the answer is that you have to do
Similar questions