Question d’entretien chez Revolut

Simple multithreading problem (programming task),