Halloween Sale
Unlock all premium questions for over 30% off
Find Minimum Reverse Operations
Medium
Question
Grayscale images at a company are saved as binary strings: a white pixel is written as '1' and a black pixel as '0'. Reading an image's string from the last character to the first gives the image's reverse. Making a backup relies on a single move, which may be used as often as needed: take any one character out of the string, wherever it sits, and put it back at the very end.
...
Asked at:Amazon
More Amazon interview questions
- Simplified Regex Pattern Matchinghard
- Count Idle Driveseasy
- Test Array Generation Serviceeasy
- Maximum Balanced Shipment Countmedium
- Detect Obfuscated Abusive Wordshard
- Merge Values Into Contiguous Blockshard
- Minimum Warehouse Redistribution Costmedium
- Maximum Consecutive ON Servershard
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.