Pergunta de entrevista da empresa University of New South Wales

Solve a binary relation problem