From c5cea25ceecfe19e8782a99ae4ca3201d1c54c98 Mon Sep 17 00:00:00 2001 From: Prerna <97434896+prerna-rn@users.noreply.github.com> Date: Sat, 27 Jan 2024 19:38:24 +0530 Subject: [PATCH] Create question.md --- .../question.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Day-26/q1: Palindrome Partitioning II/question.md diff --git a/Day-26/q1: Palindrome Partitioning II/question.md b/Day-26/q1: Palindrome Partitioning II/question.md new file mode 100644 index 0000000..e6b3fb4 --- /dev/null +++ b/Day-26/q1: Palindrome Partitioning II/question.md @@ -0,0 +1,26 @@ +Given a string s, partition s such that every substring of the partition is a palindrome. + +Return the minimum cuts needed for a palindrome partitioning of s. + +Example 1: + +Input: s = "aab" +Output: 1 +Explanation: The palindrome partitioning ["aa","b"] could be produced using 1 cut. + +Example 2: + +Input: s = "a" +Output: 0 + +Example 3: + +Input: s = "ab" +Output: 1 + +Constraints: + + 1 <= s.length <= 2000 + s consists of lowercase English letters only. + +Leetcode link: https://leetcode.com/problems/palindrome-partitioning-ii/description/