29/29
Part 6 of 6 · Pacing, and what interviewers askCheck yourself
Check yourself
5 questions
  1. 1.Level 3 adds timestamps to every operation, and your level 1 stored one bare value per key. What's the best first move?

  2. 2.A record is written at 40 with a TTL of 20. Which check keeps it alive for exactly the 20 seconds it was given?

  3. 3.At 10 you take a snapshot. Task a has no deadline, b is due at 10 and c at 12, and nothing has deleted expired tasks. How many pending tasks should the snapshot report?

  4. 4.A timer ends at 130. It's saved at 110 and restored at 500, and the spec says a restored timer keeps the time it had left. When does it end now?

  5. 5.Snapshots exist at 2, 4 and 6, and a restore asks for the state as of 5. Your loop returns the first snapshot whose time is at or before 5. What does it return, and what's right?

Now the problem this lesson builds to: 11 A system that grows in levels (the CodeSignal format)Practice it