Search
⌘K

Leetcode 1195. Fizz Buzz Multithreaded

Coordinate four threads to print the FizzBuzz sequence from 1..n in order: implement a thread-safe FizzBuzz class where each thread (fizz, buzz, fizzbuzz, number) prints its token only when the current index meets its rule, using synchronization to enforce correct ordering and no duplicates.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.