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 > K-th in the Times Table > Editorial

K-th in the Times Table — Solution & Editorial

Back to the Problem

Binary search the VALUE: for candidate v, the count of table entries ≤ v is ∑i min(N, v/i), computable in O(N). Find the smallest v with count ≥ K.

Complexity: O(N log(N²))