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, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
question
Computers and Technology, 23.06.2019 07:50
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle was in the shop and closed out by the office. this time is referred to as _ time ? a. comeback b. ro c. cycle d. lead
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
You know the right answer?
Write the function longestsubpalindrome(s), that takes a string s and returns the longest palindrome...
Questions
question
Geography, 19.02.2021 18:10
question
Mathematics, 19.02.2021 18:10
question
Mathematics, 19.02.2021 18:10