cswork / OAOpen practice workspace

EpicOA #1

Palindrome Word

Estimated EasyStatement and editorial — judging is being prepared

Topics (AI-labelled)StringsPalindromes

A palindrome is a sequence that reads the same forwards as it does backwards. "abba", for e

Example 1

Input:

s = "abcdefccfed"

Output:

cdefc
fccf
ccf

Explanation: The function prints all palindromes of 3 or more characters in length contained in the string "abcdefccfed", which are case-sensitive. The palindromes "cdefc", "fccf", and "ccf" are found and printed, while others like "cac", "fcf", or "cfcfc" are not printed due to case-sensitivity.

Editorial

Loading solution…