FastPrepPartition Array into Disjoint Intervals
Problems/Partition Array into Disjoint Intervals

Partition Array into Disjoint Intervals

Bloomberg LP logoBloomberg LP● MediumFULLTIMEPHONE SCREEN

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported with the intended linear-time outline in a first-hand Bloomberg interview.

Split nums into a nonempty left prefix and a nonempty right suffix so every value in the left part is less than or equal to every value in the right part.

Return the smallest possible length of the left part. A valid split is guaranteed.

Function

partitionDisjoint(nums: int[]) → int

Examples

Example 1

nums = [5,0,3,8,6]return = 3

The prefix [5,0,3] has maximum 5 and the suffix [8,6] has minimum 6.

Constraints

  • 2 <= nums.length <= 10^5.
  • Values fit in signed 32-bit integers.

More Bloomberg LP Phone Screen questions

  • Pascal's TrianglePHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Valid Triangle NumberPHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • 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
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fewest Coins CombinationPHONE SCREEN · Seen Nov 2026
  • Recommend Films from Viewers Who Watched Everything You DidPHONE SCREEN · Seen Nov 2026
  • Track New Values in Sorted OrderPHONE SCREEN · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026

Similar questions at other companies

  • Detonate the Maximum BombsZomato / Eternal · PHONE SCREENZomato / Eternal interview questions
  • Single Element in a Sorted ArrayGreyOrange · PHONE SCREENGreyOrange interview questions
  • Top Ten Largest FilesGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Customer Bootstrap APIDoorDash · PHONE SCREEN · ONSITE INTERVIEWDoorDash interview questions
  • 2D Convolution Layer Forward PassWaymo · PHONE SCREENWaymo interview questions
  • Concurrent Discounted Card PurchasesBrex · PHONE SCREEN
  • Pairs of Songs With Total Durations Divisible by 120Cashfree Payments · PHONE SCREEN
  • Ordered IP FirewallDatabricks · PHONE SCREENDatabricks interview questions
  • Combination SumAnduril · PHONE SCREENAnduril interview questions
  • Implement QuicksortByteDance · PHONE SCREENByteDance 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 partitionDisjoint(int[] nums) {
      // Write your code here.
    }
}
Checking account…