Problem Statement
Devu calls a string s "good palindromic" string if it contains a palindromic subtring of size greater than one.
Given a string s, Devu wants to know whether the string is a "good palindromic" substring or not. Return "good" or "not good" (without quotes).
Definition
- Class:
- DevuAndGoodPalindromicString
- Method:
- isGoodPalindrome
- Parameters:
- String
- Returns:
- String
- Method signature:
- String isGoodPalindrome(String s)
- (be sure your method is public)
Constraints
- s will have between 1 and 50 characters, inclusive.
- Each character of s will be a lower case English alphabet ('a'-'z').
Examples
"aa"
Returns: "good"
String "aa" itself is a "good" palindrome."ab"
Returns: "not good"
String "ab" is not "good" palindrome."abcdcd"
Returns: "good"
"abcfb"
Returns: "not good"
"dyofbggtfhlplctmmofhgbegsqgzaecjs"
Returns: "good"
"deqmxlgoeiwqsrlyfbpgnmr"
Returns: "not good"