NeetCode #690LC-837Medium1-D Dynamic Programming
← Back to All Problems#690 · #837 · New 21 Game(新 21 点)
📌 Problem Statement & Constraints
Starting with 0 points, repeatedly draw an integer uniformly from
[1, maxPts] and add it, stopping as soon as the score reaches k or more. Return the probability that the final score is at most n. Constraints: 0 <= k <= n <= 10^4, 1 <= maxPts <= 10^4.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!