LeetCode Question · Sep 2022

Amazon SDE2 | OA | Minimum Swap to make binary string palindrome

275 views 4 replies

Question Details

Given a binary string containing only 0 and 1, find minimum swap required to make string palindrome. If not possible return -1. Sample 1: Input: 01001 Output: 1 Sample 2: Input: 0111 Output: -1 If anyone knows...

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Strings