
August 16, 2007. A Patch Tuesday reboot cycle brings millions of Windows machines back up in the same minute, and every Skype client on them tries to log in at once. The login network buckles. Clients that got refused retried straight away, at full speed, so the queue never drained. Two days of darkness for 220 million accounts. Make the client wait longer each time it is turned away.
Objective
Return the wait the client should sit through after a run of login attempts.
Steps
$ backoff({0,0,0}, 3)
8
$ backoff({0,0,1,0}, 4)
2
$ backoff({1}, 1)
1
Expected files
Allowed functions
None. Write every helper yourself.
Loading solutions...