Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1115. Print FooBar Alternately
Coordinate two threads—one calling foo() and the other calling bar()—so their prints strictly alternate to produce "foobar" repeated n times. The challenge is enforcing correct ordering using thread synchronization primitives (e.g., semaphores, locks/condition variables, or atomic flags).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.