Google interview question

Quite Hard System Design Q