FastPrepTwo City Scheduling with an Odd Candidate Count
Problems/Two City Scheduling with an Odd Candidate Count

Two City Scheduling with an Odd Candidate Count

Bloomberg LP logoBloomberg LP● MediumNEW GRADFULLTIMEPHONE SCREENONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The source gives both city costs, the exact New York quota of ceil(n/2), and the goal of the lowest total cost. It does not give number limits or a function signature. Our version is about 98% the same as the reported question.

Each row costs[i] = [newYorkCost, sanFranciscoCost] gives the travel cost for candidate i to attend an onsite interview in one of two cities.

Send exactly ceil(n / 2) candidates to New York and every remaining candidate to San Francisco. Return the minimum possible total travel cost.

Function

minimumTravelCost(costs: int[][]) → long

Examples

Example 1

costs = [[10,20],[30,200],[400,50],[30,20]]return = 110

Send the first two candidates to New York and the other two to San Francisco for 10 + 30 + 50 + 20 = 110.

Example 2

costs = [[10,100],[20,30],[30,20]]return = 50

Because n = 3, exactly two candidates go to New York. Sending the first two there and the third to San Francisco costs 10 + 20 + 20 = 50.

Example 3

costs = [[7,3]]return = 7

The New York quota is one, so the only candidate must go to New York even though San Francisco is cheaper.

Constraints

  • 1 <= costs.length <= 100000.
  • costs[i].length = 2.
  • 1 <= costs[i][j] <= 100000.

More Bloomberg LP Phone Screen questions

  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE 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
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Sparse Vector and Matrix OperationsPHONE SCREEN · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026

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
  • Minimum Station Tracks for a Train ScheduleBNSF Railway · ONSITE INTERVIEWBNSF Railway interview questions
  • Remove the Fewest Magic BeansThe D.E. Shaw Group · PHONE SCREENThe D.E. Shaw Group interview questions
  • Aggressive CowsAmazon · PHONE SCREEN
  • Unit-Weight Knapsack with Limited QuantitiesGoogle · ONSITE INTERVIEWGoogle interview questions
  • Minimize Range After Three ChangesDRW · PHONE SCREENDRW interview questions
  • Reduce Array Size to At Most HalfMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Maximize Monsters DefeatedSalesforce · ONSITE INTERVIEWSalesforce interview questions
  • Maximize Workday EarningsCitadel · OA · PHONE SCREEN · ONSITE INTERVIEWCitadel interview questions

Interview reports that mention this question

  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
  • Bloomberg New Grad SWE Interviews: 98 Experiences (Part 1 of 5)

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg SWE Intern Interview Questions: 68 Questions
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public long minimumTravelCost(int[][] costs) {
        // Write your code here.
    }

}
Checking account…