Google interview question

A system design question, Graphs, Stack