Pergunta de entrevista da empresa Visa Inc.

Map counting problem. Count how many devices were fixed. The device should be fixed, when it's considered faulty by giving negative response 3 times in a row. After every fix or positive response, counter of faulty-status resets.