Qualcomm interview question

Implement randeveouz for two threads in pseudo code