Pergunta de entrevista da empresa Google

Quickly estimate 2^64 without using a pen/papar.

Respostas da entrevista

Sigiloso

1 de jul. de 2011

2 ^ 10 = 1.024 * (10^3) 2 ^ 60 = (1.024 ^ 6) * (10 ^ 18) 2 ^ 64 = (16 * (1.024 ^ 6) * (10 ^ 18) ) All, we need to solve is 1.024 ^ 6. using binomial expansion, ignoring the smaller terms we get : (1 + 0.024) ^ 6 = 1 + 6 * 0.024 = 1.144 = 1.15 (approx) Hence the answer is : (16 * 1.15) * (10 ^ 18) = 18.4 * (10 ^ 18) It is much closer to the actual answer and very fast to calculate.

10

Sigiloso

29 de jun. de 2011

2^10=1024 ~10^3 2^64=(2^10)^6 * 2^4 => (10^3)^6*16 => 10^18*16 => 1.6 * 10 ^ 19 = 16,000,000,000,000,000,000 Calculator says: 18,446,744,073,709,551,616

5

Sigiloso

26 de ago. de 2011

2^32 ~= 4 bil 2^64 = 4bil * 4 bil = 16 bil bil each bil 9 0's, so 16 with 18 0's.

3

Sigiloso

9 de jun. de 2019

well in binary, 1 followed by 64 0s. They didn't specify answer should be in decimal.

1

Sigiloso

21 de jun. de 2012

It is 16 billion billions

1

Sigiloso

27 de jun. de 2011

Well, 2^8 is 256 and 2^16 is that squared, which should have 5 digits.. If I square it again, I should have double those digits, and again if I square it again.. So I'm looking for something in the neighborhood of 1x10^20, or approx 10,000,000,000,000,000,000. Calculator says: 18,446,744,073,709,551,616--> I'm in the ballpark.

1

Sigiloso

3 de ago. de 2011

Donno if this is to test witt and prepness.. I would say 18,446,.... so on He ll ask how i get that.. Say "calculator" The question was about without using pen/paper

Sigiloso

12 de jan. de 2013

They are talking about 64 bit integer, where left most bit is set to 1, and rest to 0. Considering it is 64 bit unsigned integer, it should be equal to value of 32 unsigned integer where all bits are 1, which I guess is somewhere around 4billion, or you can just say 2^64 = UInt32.MaxValue

Sigiloso

29 de jan. de 2016

2^64 the answer is 32