Enforce Execution Order Across Three Threads
Asked at Zoox · Coding Questions · Difficulty: Medium
Three different threads call the methods `first`, `second` and `third` of one shared object, and the operating system may run those calls in any order. Build the object so that the three outputs always appear in the order `first`, `second`, `third`, whatever order the calls arrive in.
Loading the problem…
More Zoox interview questions
- System Design for Full Stack Applications
- Top 3 Vendors by Total Charged Dollars in Last 2 Years
- Top 3 Vendors by Total Charged Amount in the Last 2 Years (Net of Refunds)
- Top 3 vendors by city and state in the last 2 years
- JavaScript Proficiency Assessment
- Compute Roller Coaster Overall Scores (Extensible Rules)