โ† Sabre questions

Minimum operations to make string palindrome containing substring

Filed under Sabre

The question

Given two strings S1 and S2, find the minimum number of character replacements needed to make S1 a palindrome that contains S2 as a substring. Return -1 if not possible.

No write-up yet. Related questions below have one.

Related Sabre questions

Collected from public candidate posts and coding forums. Updated Nov 2026.