Find Combinations for Game Scoring
Find the number of ways a player can score n runs.
Statement
Imagine a game where, in each turn, a player can score either or runs. Given a score, n
, find the total number of ways to score n
runs.
Examples
To score runs, a player can score in the following three ways:
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.