Halloween Sale
Unlock all premium questions for over 30% off
Merge Values Into Contiguous Blocks
Hard
Question
arr is an array of n integers. Each operation selects two distinct values x and y, both present in arr, and turns every x in the array into a y.
...
Asked at:Amazon
More Amazon interview questions
- Minimum Warehouse Redistribution Costmedium
- Maximum Consecutive ON Servershard
- Assign Books To Shelvesmedium
- Compress Nodes In N-ary Treemedium
- Frequent Events Within 24 Hoursmedium
- Find Smallest Available Hubmedium
- Assemble String From Blocksmedium
- All String Reorganizationseasy
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.