NeetCode #537LC-1675HardHeap / Priority Queue
← Back to All Problems

#537 · #1675 · Minimize Deviation in Array(最小化数组中的最大值)

📌 Problem Statement & Constraints

You are given an array nums of positive integers. You may divide any even number by 2, or multiply any odd number by 2, any number of times. Return the minimum possible deviation: the maximum minus the minimum value in the array. Constraints: 1 <= nums.length <= 5 * 10^4, 1 <= nums[i] <= 10^9.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!