Fall SalePremium questions, over 25% offUnlock all premium questions for over 25% 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
- Count Idle Driveseasy
- Test Array Generation Serviceeasy
- Maximum Balanced Shipment Countmedium
- Maximum Consecutive ON Servershard
- Merge Values Into Contiguous Blockshard
- Find Smallest Available Hubmedium
- Frequent Events Within 24 Hoursmedium
- Compress Nodes In N-ary Treemedium
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.