Winter SalePremium questions, over 25% offUnlock all premium questions for over 25% 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
- Find Smallest Available Hubmedium
- Frequent Events Within 24 Hoursmedium
- Compress Nodes In N-ary Treemedium
- Assign Books To Shelvesmedium
- Minimum Warehouse Redistribution Costmedium
- Detect Obfuscated Abusive Wordshard
- Minimum Variant Conversion Costmedium
- Diagonal Server Redirect Pathhard
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.