← Nvidia questions
CodingReported in a candidate post, Sep 2023

Print 1 to N using N threads in sequence indefinitely

Filed under Nvidia

Create N threads where thread i prints the number i (1 to N). The output must be 1, 2, ..., N, 1, 2, ..., N repeating, so threads take strict turns. Use semaphores for the hand-off. Follow-up: solve…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Nvidia questions

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