Apple Interview Question

Phone question: How would you test a semaphore?

Interview Answer

Anonymous

Mar 25, 2022

I would test the semaphore as I would test any finite state machine -- ensure that state transition rules are not violated.