Question: How would you design the data structures for a very large social network (Facebook, LinkedIn, etc)? Describe how you would design an algorithm to show the connection,
or path, between two people

Solution: When we deal with a service the size of Orkut or Facebook, we cannot possibly keep all of our data on one machine. That means that our simple Person data structure from above doesn’t quite work—our friends may not live on the same machine as us. Instead, we can replace our list of friends with a list of their IDs, and traverse as follows: 1. For each friend ID: int machine_index = lookupMachineForUserID(id); 2. Go to machine machine_index 3. Person friend = lookupFriend(machine_index);