subject

Write the function longestsubpalindrome(s), that takes a string s and returns the longest palindrome that occurs as consecutive characters (not just letters, but any characters) in s.
so longestsubpalindrome("ab-4-! ") returns "b-4-b".if there is a tie, return the lexicographically larger value -- in python, a string s1 is lexicographically greater than a string s2 if (s1 > s2).
so: longestsubpalindrome("abcbce") returns "cbc", since ("cbc" > "bcb"). note that unlike the previous functions, this function is case-sensitive (so "a" is not treated the same as "a" here).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
When creating a field in a table, you must set the to determine what type of data the field can store. field property data type field type data property
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Who introduced the concept of combining artificial and natural light in the studio
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
Systolic pressure is a measure of blood pressure when the ventricles relax and fil with blood ture or false
Answers: 1
You know the right answer?
Write the function longestsubpalindrome(s), that takes a string s and returns the longest palindrome...
Questions
question
Biology, 09.09.2020 01:01
question
Mathematics, 09.09.2020 01:01
question
Biology, 09.09.2020 01:01
Questions on the website: 13722364