FastPrepChance a Face Shows on At Least K Dice
Problems/Chance a Face Shows on At Least K Dice

Chance a Face Shows on At Least K Dice

Jane Street logoJane Street● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in one Jane Street trade desk operations report from New York, posted in 2021. The process it describes has a written test of Excel tasks and then a phone round of three statistics questions, all maths. Its one listed question is about the chance of seeing a particular face when several dice are thrown. The report gives no dice count and does not say whether the face must appear at least once or exactly once.

We chose the number of dice and the number of faces as inputs, and ask for the chance that the face appears on at least k dice, which is the usual at-least-once question when k is 1. The limits, the tolerance and all three examples are ours.

Our version is about 70% the same as the reported question.

You roll n fair dice at once. Each die has sides faces numbered 1 to sides, every face is equally likely, and the dice do not affect each other.

Fix one face value X before the roll. Return the probability that X shows on at least k of the dice. The answer is the same for every choice of X, so X is not an input.

Answers within 10-6 of the correct value are accepted.

Function

diceFaceProbability(n: int, sides: int, k: int) → double

Examples

Example 1

n = 3sides = 6k = 1return = 0.4212962962962963

Each die misses the chosen face with chance 5/6, so all three miss with chance 125/216. At least one shows it with chance 1 - 125/216 = 91/216, about 0.4213.

Example 2

n = 2sides = 6k = 2return = 0.027777777777777776

Both dice must show the face: 1/6 * 1/6 = 1/36.

Example 3

n = 5sides = 2k = 3return = 0.5

Two-sided dice act like fair coins. Of the 32 equally likely rolls, 10 + 5 + 1 = 16 show the face on at least three dice, so the answer is 1/2.

Constraints

  • 1 <= n <= 1000
  • 2 <= sides <= 100
  • 1 <= k <= n

More Jane Street Phone Screen questions

  • Maximum-Scoring Consecutive Tree LevelsPHONE SCREEN · Seen Nov 2026
  • Tree Selection and VisibilityPHONE SCREEN · Seen Nov 2026
  • Load/Store Arithmetic InterpreterPHONE SCREEN · Seen Oct 2026
  • Instrument Stack Language JumpsPHONE SCREEN · Seen Oct 2026
  • Run a Stack Language InterpreterPHONE SCREEN · Seen Oct 2026
  • Positive-Integer Expression EvaluationPHONE SCREEN · Seen Oct 2026
  • Add Two Integers Given as StringsPHONE SCREEN · Seen Sep 2026
  • Angle Between Clock HandsPHONE SCREEN · Seen Jul 2026
  • Route Length From Two CyclistsPHONE SCREEN · Seen Jul 2026
  • Sort TradesPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026

Similar questions at other companies

  • Dice-Walk Winning ProbabilityGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • 3D Grid Diagonal Walk ProbabilityApple · PHONE SCREENApple interview questions
  • Coin Game From The EndsTekion · PHONE SCREENTekion interview questions
  • Median of Uniform Draws in an IntervalSusquehanna International Group (SIG) · PHONE SCREENSusquehanna International Group (SIG) interview questions
  • Starting Value with the Longest Collatz ChainZipRecruiter · PHONE SCREENZipRecruiter interview questions
  • Count Array DerangementsInMobi · PHONE SCREENInMobi interview questions
  • Maximum-Product Subarray with an Empty ChoiceAkuna Capital · PHONE SCREENAkuna Capital interview questions
  • Probability of Consecutive HeadsSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions
  • Count Staircase WaysGoldman Sachs · PHONE SCREENGoldman Sachs interview questions
  • New 21 Game ProbabilityUiPath · PHONE SCREEN

Interview reports that mention this question

  • Jane Street TDO Phone Math Round: 26 Experiences (Part 9 of 10)

Jane Street interview experiences

  • Jane Street TDO UK and Hong Kong: 22 Experiences (Part 10 of 10)
  • Jane Street TDOE US Final Round: 11 Experiences (Part 5 of 10)
  • Jane Street TDOE UK Phone Screen: 15 Experiences (Part 4 of 10)
  • Jane Street TDO Excel and VBA Test: 23 Experiences (Part 8 of 10)
  • Jane Street TDOE UK Coding Round: 15 Experiences (Part 3 of 10)
All Jane Street interview questionsSee Jane Street hiring insights
Saved
class Solution {
    public double diceFaceProbability(int n, int sides, int k) {
      // Write your code here.
    }
}
Checking account…