3i Infotech interview question

semaphore