Google Interview Question: How long will it take for an ... | Glassdoor.com.au

Interview Question

Senior Software Engineer Interview Sydney

How long will it take for an unsigned 64 bit counter to

  overflow on a xxx ghz machine and another coding problem that requires recursive programming.
Answer

Interview Answer

2 Answers

3

unsigned 64-bit counter = 2^64.
xxx GHz machine = xxx * 10^9 cycles/second, ie. 1 cycle is 1/(xxx * 10^9) seconds.

Assuming the counter increments 1 every cycle, then it'll max out at:
2^64 / (xxx * 10^9) seconds.

Anon on 26 Jul 2013
0

1 G = 2 ^ 30

Doug on 17 Dec 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.