Google Interview Question

How would you optimize an algorithm to ensure that no duplicate data was being stored on Google servers?

Interview Answers

Anonymous

Apr 6, 2015

I unfortunately focused on how to identify at time of saving file, and I think I should have focused on background processes after time of saving file.

Anonymous

Jun 24, 2016

Before going into the bits and bytes of optimization, I would start with the low hanging fruit- People share videos, pics, files on gmail all the time and most of the time the recipients are on the same service (gmail, G+...). I would transparently share a link to the file rather than duplicate the content across recipients inboxes. When the content is activated, the content can be streamed (jpg, mpg etc) or downloaded (files). that way, a users inbox capacity is spared as well. Next, the WHY is important- Why is optimization needed? Are we OK with a really slow load (whats the tradeoff?)? Are we trying to proactively archive content (E.g. move stuff >1yr old to spinning platters vs. keep newer stuff on faster SSD)- Is the driving factor cost? what about customer satisfaction? If people get frustrated that their yr old pics are taking ages to load, they will not be happy.

1