← Amazon questions
CodingReported in a candidate post, Jun 2020

Count frequency in sorted array and max coins from bags in K turns

Filed under Amazon

Given N bags with coins and K turns, where each turn takes half the coins (rounded down) from a selected bag, return the maximum number of coins taken out using a Max Heap.

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 Amazon questions

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