Back to the 100
Course Practice
Hard

Different Palindromic Substrings

LAB

Return the number of distinct palindromic substrings in s.

EXAMPLES

Example 1
Input
{
  "s": "bccb"
}

Output
6

FUNCTION SHAPE

s: stringint
00:00
2 local tests readyRun with ⌘/Ctrl + Enter. Your code stays in this browser.

Runs solve(...) locally in a browser worker. SWE Playbook does not submit your code. Only run code you trust; Python code may access the network.