โ† Visa questions
CodingMedium

Min operations to make binary string all ones

Filed under Visa

Given a binary string, return the minimum operations to make all characters '1' by replacing two adjacent characters with their XOR value, or return -1 if impossible.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Visa questions

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