Arrange Balls with Sequence Constraints
Filed under Goldman Sachs
The question
Given k types of balls with counts n1, n2...nk, find the number of ways to arrange them on a line such that the last ball of a specific color appears before the last ball of another color based on a provided sequence.
No write-up yet. Related questions below have one.
Related Goldman Sachs questions
Collected from public candidate posts and coding forums. Updated Nov 2026.