← CodeNation questions
CodingReported in a candidate post, Sep 2020

Expected turns for K distinct elements

Filed under CodeNation

The question

Find the expected number of turns needed to generate K distinct elements using a random number generator from 1 to N, modulo 10^9+7.

No write-up yet. Related questions below have one.

Related CodeNation questions

Collected from public candidate posts and coding forums. Updated Nov 2026.