Revolut Interview Question

Simple multithreading problem (programming task),