FastPrepSplit Array Largest Sum
Problems/Split Array Largest Sum

Split Array Largest Sum

Bloomberg LP logoBloomberg LP● HardNEW GRADONSITE INTERVIEW

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report states that the second virtual-onsite round asks to divide an array into d segments and minimize the maximum segment sum, and says the candidate used dynamic programming. This practice version makes the conventional contiguous, nonempty, nonnegative-array contract explicit and returns a 64-bit result.

Given a nonnegative integer array nums and an integer d, split nums into exactly d nonempty contiguous segments.

For a split, calculate the sum of every segment and take the largest segment sum. Return the minimum possible value of that largest sum.

Function

splitArrayLargestSum(nums: int[], d: int) → long

Examples

Example 1

nums = [7,2,5,10,8]d = 2return = 18

Splitting as [7,2,5] and [10,8] gives segment sums 14 and 18. No two-segment split has a smaller maximum.

Example 2

nums = [1,2,3,4,5]d = 2return = 9

The optimal split is [1,2,3] and [4,5], whose largest sum is 9.

Example 3

nums = [1,4,4]d = 3return = 4

Exactly three nonempty segments force one element per segment.

Constraints

  • 1 <= nums.length <= 100000.
  • 0 <= nums[i] <= 1000000000.
  • 1 <= d <= nums.length.
  • The sum of nums fits in a signed 64-bit integer.

More Bloomberg LP Onsite Interview questions

  • Collatz Conjecture with Shared MemoizationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Top K Frequent WordsONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Decode StringPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Minimum Replacements to Make Two Strings AnagramsPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Split Array to Minimize the Largest SumInfosys · OAInfosys interview questions
  • Split Array Largest SumAuxoAI · OA
  • Split Array to Minimize the Largest SumNation with NaMo · PHONE SCREEN
  • Minimize the Largest Part BeautyAdobe · PHONE SCREENAdobe interview questions
  • Russian Doll EnvelopesGoogle · ONSITE INTERVIEWGoogle interview questions
  • Minimum Taps to Water a GardenThe D.E. Shaw Group · ONSITE INTERVIEWThe D.E. Shaw Group interview questions
  • Allocate Minimum PagesAmazon · ONSITE INTERVIEW
  • Minimum Processing Speed with Multiple RidersDoorDash · ONSITE INTERVIEWDoorDash interview questions
  • Russian Doll EnvelopesInMobi · ONSITE INTERVIEWInMobi interview questions
  • Russian Doll EnvelopesAirbnb · ONSITE INTERVIEWAirbnb interview questions

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg SWE Intern Interview Questions: 68 Questions
  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
  • Bloomberg Experienced SWE Interviews: 167 Questions (Part 1 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public long splitArrayLargestSum(int[] nums, int d) {
        // Write your code here.
    }

}
Checking account…