Round 1
Questions: Given a binary string containing 0's and 1's. You can swap any two elements. Give the minimum number of swaps to make it a palindrome. Return -1 if it is not possible to make it a palindrome by swapping.
Sample Test Cases:
- TC1:
101000
-> 1 swap ->100001
, Output: 1 - TC2:
0100101
-> 1 swap ->0101001
-> 1 swap ->1001001
, Output: 2
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.