← All problemsSign in

3734. Lexicographically Smallest Palindromic Permutation Greater Than Target

LeetCodeTwo PointersStringEnumerationOpen on judge ↗

You are given two strings s and target, each of length n, consisting of lowercase English letters. Return the lexicographically smallest string that is both a palindromic permutation of s and strictly greater than target. If no such permutation exists, return an empty string. Example 1: Input: s = "baba", target = "abba" Output: "baab" Explanation: - The palindromic permutations of s (in l

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start