Hiring process8 levels
  1. 1 IQ Test
  2. 2 Additional Online Test (If Required)
  3. 3 Office Interview with Hiring Manager
  4. 4 Unpaid Test Task (Motivation Check)
  5. 5 Paid Test Task and Follow-Up Interview
  6. 6 Iterative Paid Test Tasks
  7. 7 Office Verification
  8. 8 Final Interview with the Founder

Problems > Counting Dice Rolls > Editorial

Counting Dice Rolls — Solution & Editorial

Back to the Problem

A DP over (dice used, running sum) is O(D·T·F); the inclusion–exclusion formula ∑(−1)jC(D,j)C(T−jF−1, D−1) is O(T/F).

Complexity: O(D·T·F) or O(D)