Apple interview question

Difficult algorithm questions on system design