To create a network graph from a log file in 20 mins. Guess the interviewer wanted a simple dictionary as a data structure but confused me with calling it a network graph repeatedly. If he indeed wanted it like a graph where all properties such as pre order , in order traversal could be applied. It's no way a 20 min question.
Sigiloso
Adjacency matrix will get too big in space for facebook logs i guess.