How would you design google maps?
Anonimo
This question was a bit of an open ended question. We could go as low or as high in detail as I wanted to go. I chose to go a somewhat inbetween. This was probably the hardest question because I didn't really have a good idea of how it was built or what was the underlying technology underneath (don't memorize this, my interviewer said it was actually better that I didn't know so that we could discuss it). I believe what I said was that the maps would have some sort of graph data structure underneath (i think that makes the most logical sense) and that things like locations would be vertices and edges would be all the roads. After that, my memory gets a bit fuzzy but I remember talking about things like how would I speed things up? What's going on behind the scenes when people are dragging their location ? After a bunch of hints ( you can already tell that I was a bit lost), I said things like caching would make things faster, you can cache the data structures of your location on your computer instead of retrieving it from the server, when you drag the map around, basically you compute the vector of where your mouse is going and then retrieve each image in the direction of the opposite of your vector.