Hiring process8 levels
  1. 1 IQ Test
  2. 2 Additional Online Test (If Required)
  3. 3 Office Interview with Hiring Manager
  4. 4 Unpaid Test Task (Motivation Check)
  5. 5 Paid Test Task and Follow-Up Interview
  6. 6 Iterative Paid Test Tasks
  7. 7 Office Verification
  8. 8 Final Interview with the Founder

Problems > Bacteria in a Dish > Editorial

Bacteria in a Dish — Solution & Editorial

Back to the Problem

Double at most ~60 times before exceeding any 64-bit cap — loop with an early break at C, never computing 2H blindly.

Complexity: O(1) or O(log)

Watch out: 2H for H = 109 overflows everything — break out as soon as the cap is hit.