Tap here to switch tabs
Problem
Submissions

Problem: Palindrome Partitioning II

Palindrome Partitioning II asks you to split a string into palindromic substrings and return the fewest cuts needed to separate the entire string into valid pieces.

Statement

Given a string s, partition s such that every substring in the partition is a palindrome.

Return the minimum number of cuts needed for a palindrome partitioning of s.

Constraints:

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

  • s consists of lowercase English letters only.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Palindrome Partitioning II

Palindrome Partitioning II asks you to split a string into palindromic substrings and return the fewest cuts needed to separate the entire string into valid pieces.

Statement

Given a string s, partition s such that every substring in the partition is a palindrome.

Return the minimum number of cuts needed for a palindrome partitioning of s.

Constraints:

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

  • s consists of lowercase English letters only.