Tap here to switch tabs
Problem
Submissions

Problem: Palindromic Substrings

Palindromic Substrings asks you to count every contiguous substring of a given string that reads the same forward and backward, including single characters.

Statement

Given a string, s, return the number of palindromic substrings contained in it. A substring is a contiguous sequence of characters in a string. A palindrome is a phrase, word, or sequence that reads the same forward and backward.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of only lowercase English characters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Palindromic Substrings

Palindromic Substrings asks you to count every contiguous substring of a given string that reads the same forward and backward, including single characters.

Statement

Given a string, s, return the number of palindromic substrings contained in it. A substring is a contiguous sequence of characters in a string. A palindrome is a phrase, word, or sequence that reads the same forward and backward.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of only lowercase English characters.