Pergunta de entrevista da empresa Apple

Difficult algorithm questions on system design