Count Palindromes Problem
Count Palindromes Problem — ExecCode Easy DSA Practice
Solve the Count Palindromes problem on ExecCode. Free online easy DSA practice in String. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given the input needed to solve Count Palindromes. Your task is to in Count Palindromes, you must respect the tree structure instead of treating values as a flat list. A hierarchy is stored as a tree, and each parent-child link affects the final answer. s: input string. Return palindromic substring count.
Examples
Input {"s": "abc"}; Output 3. Input {"s": "aaa"}; Output 6. Input {"s": "aba"}; Output 4
Constraints
1 <= len(s) <= 1000
Practice Count Palindromes free on ExecCode. Browse DSA problems, topic map, and placement guides.