4 ms·
One of my favorite questions from my take home interview is: > I just turned 1 billion seconds old. What day was I born? > Show your work. Bonus points for pre
by extragood 4y ago
One of my favorite questions from my take home interview is:
> I just turned 1 billion seconds old. What day was I born?
> Show your work. Bonus points for precise second.
Most people would do it the hard way - determine the number of days in 1 billion seconds, and then work backwards to get the date.
The approach that I look for (and surprisingly few people thought to do) was to get the current unix timestamp, remove the leading 1 (billions) and get the datetime for that timestamp.