Pergunta de entrevista da empresa Apple

two sum, linked list loop, readers-writers problem.