Dynamic Weighted Random Letter Generator
Problem
Implement a dynamic weighted random letter generator. Each active letter has a positive integer weight. A call to the generator must return each letter with probability equal to its weight ...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
