Available question text
Assign 2n people to two cities so exactly n go to each city and the total travel cost is minimized. The core challenge is selecting which n people go to city A vs B based on their per-person cost differences (aCost - bCost), which yields a greedy sorting-based solution.
Related questions
Continue with questions that share topics or the same question type.
- Add two decimal strings e.g. '123.45' + '236.7'
Coding
- Add Two Integers
Coding · Math
- Add Two Numbers
Coding · Linked List · Math · Recursion
- Add Two Numbers II
Coding · Linked List · Math · Stack
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1029. Two City Scheduling
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source