Loading Company...
This is a verified interview question from Oracle. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Palindromic Triplets" covers key patterns like Strings.
"Given a string S consisting of lowercase English letters, count the number of substrings of length 3 that are palindromes. A substring of length 3 is considered a palindrome if it reads the same forward and backward. Task: Return the total number of palindromic substrings of size 3 present in the string. ### Example: * Input: S = "ababa" * Output: 3 Explanation: Palindromic substrings of length 3 → "aba", "bab", "aba"."
Join thousands of developers practicing for Oracle.