Loading page…
A monitoring system runs a nightly job that compares every alert id with every later one. Counting the checks by hand for five ids, then by formula for two hundred thousand, shows the job is a hundred times over budget. The lesson covers counting a basic step by running instrumented code, nested loops that multiply, loops in a row that add, a loop that halves, and the mistakes that spoil a count: an inner loop with an early exit, an off by one bound, a rounded logarithm and a loop hidden in a call.
You work on a monitoring system.