FastPrepMinimize Array Sum After K Halving Operations
Problems/Minimize Array Sum After K Halving Operations

Minimize Array Sum After K Halving Operations

DocuSign logoDocuSign● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report gives the main task and the interview setting. We chose the function signature, a fixed tie rule, the examples, and the input limits. Our version is about 90% the same as the reported question.

Perform exactly k operations on an array of nonnegative integers. In one operation, choose an element, replace it by ceil(value/2), and put it back.

Return the minimum possible array sum after all operations.

Function

minimumSumAfterHalves(values: int[], k: int) → long

Examples

Example 1

values = [10,20,7]k = 4return = 14

Repeatedly reducing a current maximum yields the minimum sum.

Example 2

values = [1,1]k = 3return = 2

Halving one leaves it at one, so the sum stays two.

Example 3

values = [5]k = 2return = 2

Five becomes three, then two.

Constraints

  • 1 <= values.length <= 100000.
  • 0 <= values[i] <= 10^9.
  • 0 <= k <= 100000.

More DocuSign Phone Screen questions

  • Symmetric Binary TreePHONE SCREEN · Seen Oct 2026
  • Union Area of Two RectanglesPHONE SCREEN · Seen Oct 2026
  • Execute Cursor-Based Text Editor OperationsPHONE SCREEN · Seen Sep 2026
  • Fizz and Buzz Words From 1 to nPHONE SCREEN · Seen Sep 2026
  • Two Positions That Add Up to a TargetPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Rain Kept Between WallsPHONE SCREEN · Seen Mar 2026
  • Exact Palindrome CheckPHONE SCREEN · ONSITE INTERVIEW · Seen Apr 2022
  • Reverse the Characters of a TextPHONE SCREEN · ONSITE INTERVIEW · Seen Apr 2022
  • Rebuild a Trip From Flight TicketsPHONE SCREEN · Seen Apr 2019
  • Find the Words for Each PrefixPHONE SCREEN · Seen Sep 2018

Similar questions at other companies

  • Tennis Court SchedulingAtlassian · PHONE SCREEN · ONSITE INTERVIEWAtlassian interview questions
  • Maximum Number of Events That Can Be AttendedByteDance · PHONE SCREENByteDance interview questions
  • Defer Expenses to Preserve BalanceDRW · PHONE SCREENDRW interview questions
  • Maximum Number of Events That Can Be AttendedSnowflake · PHONE SCREENSnowflake interview questions
  • Automation Pipeline, Part 3: Stage DurationPlaid · PHONE SCREENPlaid interview questions
  • Minimum Sum After K Ceiling HalvingsAdobe · PHONE SCREENAdobe interview questions
  • Furthest Building with Bricks and LaddersAmazon · PHONE SCREEN
  • Schedule Unit-Time Jobs for the Most ProfitScale AI · PHONE SCREENScale AI interview questions
  • Minimum Meeting RoomsSentry · PHONE SCREENSentry interview questions
  • Minimum Operations to Halve an Array SumGrab · PHONE SCREENGrab interview questions

DocuSign interview experiences

  • DocuSign SWE Intern Interviews: 27 Experiences (Part 2 of 2)
  • DocuSign SWE Intern OA Questions: 53 Experiences (Part 1 of 2)
All DocuSign interview questionsSee DocuSign hiring insights
Saved
class Solution {
    public long minimumSumAfterHalves(int[] values, int k) {
        // write your code here
    }
}
Checking account…