Halloween Sale
Unlock all premium questions for over 30% off
Largest Number Using Parity Swaps
Medium
Question
You are given a string num made of digits. You may swap two adjacent digits only when they share the same parity, meaning both are odd or both are even. You can perform this operation as many times as you like.
...
Asked at:IBM
More IBM interview questions
- Largest Bounded XORmedium
- Earliest Target Reach Timeeasy
- Smallest Nondecreasing Incrementeasy
- Maximum Distinct Split Scoreeasy
- Maximum Test Window Efficiencymedium
- Maximum Balanced Task Distributioneasy
- Find Unused Subsequence Wordseasy
- Count Mismatched Sale Priceseasy
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.