Oracle logoOracle
Coding·45 minMembers

Minimum Sum After K Halvings (Max-Heap)

Members only

Given a non-negative integer array and an integer `k`, repeatedly pick one element and replace it with `ceil(element / 2)`. After at most `k` operations, minimise the remaining sum. Asked as the third...

MLE
SWE
heap
greedy
array
medium
Frequency
Single report
Last asked
2025-08-06
Stage
onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...