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 > Compound Doubling > Editorial

Compound Doubling — Solution & Editorial

Back to the Problem

Simulate year by year with integer flooring: b += b·R/100. B ≥ 100 guarantees the yearly gain is at least 1, and the loop runs at most ~70 iterations (R = 1 doubles in about 70 years).

Complexity: O(1) or O(log)

Watch out: Floating-point interest drifts off the integer flooring — keep the whole simulation in integers.