FastPrepMinimum Beauty
Problems/Minimum Beauty

Minimum Beauty

Bloomberg LP logoBloomberg LP● HardFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: This is the first of two coding tasks from a Bloomberg online assessment for a senior software engineer role. You cut an array into exactly k pieces that keep their order and are never empty. A piece is rated by its biggest value multiplied by how many values it holds, the value of a whole cut is the rating of its worst piece, and you want the cut whose worst piece is as small as possible. The report rates one sample piece, and we keep that sample in the statement.

It does not give limits on n, k or the values, whether values can be zero or negative, a full example with an answer, or the function. We chose 1 <= k <= n <= 1000 and values from 1 to 100,000, named the function, and wrote all three examples ourselves.

Our version is about 95% the same as the reported question.

You are given an integer array arr of length n and an integer k. Split arr into exactly k non-empty subarrays of consecutive elements, so that every element belongs to exactly one subarray.

The score of a subarray is its largest element times its number of elements. For example, the score of [1, 4, 2] is 4 * 3 = 12. The beauty of a split is the largest score among its k subarrays.

Return the minimum possible beauty over all ways to split arr into exactly k subarrays.

Function

minimumBeauty(arr: int[], k: int) → int

Examples

Example 1

arr = [1,4,2,5,1]k = 2return = 12

There are four ways to cut the array into two parts. [1] [4, 2, 5, 1] has scores 1 and 5 * 4 = 20, so its beauty is 20. [1, 4] [2, 5, 1] has scores 8 and 15, beauty 15. [1, 4, 2] [5, 1] has scores 12 and 10, beauty 12. [1, 4, 2, 5] [1] has scores 20 and 1, beauty 20. The smallest beauty is 12.

Example 2

arr = [2,2,2,2,2]k = 2return = 6

Every element is 2, so a part of length L scores 2 * L. The two parts have lengths that add up to 5, so the longer one has length at least 3 and scores at least 6. Lengths 3 and 2 give scores 6 and 4, so the answer is 6.

Example 3

arr = [6,1,1,1]k = 2return = 6

The part that holds 6 scores at least 6. Putting 6 alone gives [6] [1, 1, 1] with scores 6 and 1 * 3 = 3, so the beauty is 6. Any other cut puts more elements next to 6 and scores 12 or 18. So the answer is 6.

Constraints

  • 1 <= k <= n <= 1000, where n = arr.length
  • 1 <= arr[i] <= 100000

More Bloomberg LP Online Assessment questions

  • Count Distinct Arrays After Decrement OperationsOA · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Longest Distance in a Frequency-Limited NetworkOA · Seen Sep 2026
  • Maximum Redundancy After One Segment FlipOA · Seen Sep 2026
  • Sum of Pipeline Response TimesOA · Seen Sep 2026
  • Merge IntervalsOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Design an Ordered StreamOA · PHONE SCREEN · ONSITE INTERVIEW · Seen May 2026
  • Count Teams Outscoring a Target TeamOA · Seen Feb 2023
  • Ashley Loves Numbers (Financial Engineer)OA · Seen Nov 2019
  • Consecutive Sum (Financial Engineer Intern)OA · Seen Nov 2019

Similar questions at other companies

  • Minimum Operations to Make a SubsequenceGoogle · OAGoogle interview questions
  • Split Array to Minimize the Largest SumInfosys · OAInfosys interview questions
  • Split Array Largest SumAuxoAI · OA
  • Data ReorganizationGoldman Sachs · OAGoldman Sachs interview questions
  • Find Optimal LevelAmazon · OA
  • Capacity to Ship Packages Within DaysMicrosoft · OA · ONSITE INTERVIEWMicrosoft interview questions
  • Rock JumpingIMC Trading · OAIMC Trading interview questions
  • Minimize Maximum Group DifferenceDRW · OADRW interview questions
  • Array NullificationQRT · OA
  • Minimum-Cost Solar Rooftop AllocationDeloitte · OADeloitte 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 int minimumBeauty(int[] arr, int k) {
      // Write your code here.
    }

}
Checking account…