Tap here to switch tabs
Problem
Submissions

Problem: Smallest Palindromic Permutation Greater Than Target

Try to solve the Lexicographically Smallest Palindromic Permutation Greater Than Target problem.

Statement

Given two strings s and target of equal length, return the lexicographically smallest palindromic permutation of s that is strictly greater than target. If no such palindromic permutation exists, return an empty string "".

A string is called a palindrome if it reads the same forward and backward.

Constraints:

  • 1≤1 \leq n ==== s.length ==== target.length ≤300\leq 300

  • s and target consist of only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Smallest Palindromic Permutation Greater Than Target

Try to solve the Lexicographically Smallest Palindromic Permutation Greater Than Target problem.

Statement

Given two strings s and target of equal length, return the lexicographically smallest palindromic permutation of s that is strictly greater than target. If no such palindromic permutation exists, return an empty string "".

A string is called a palindrome if it reads the same forward and backward.

Constraints:

  • 1≤1 \leq n ==== s.length ==== target.length ≤300\leq 300

  • s and target consist of only lowercase English letters.