Easy data structure and algorithm practice puzzle.
Given an attempt number, a base delay and a ceiling, return how long to wait before retrying: double the delay on every attempt and never exceed the ceiling. The doubling is what stops a room full of clients retrying in lockstep and colliding forever, and the ceiling is what stops the tenth failure scheduling a retry for next week.
Solve it three ways: snap the jigsaw pieces together, fill in the blanks, or type it from scratch against the tests. This one is free.
Browse all 536 puzzles