Domanda di colloquio di Ubisoft

A leetcode hard problem about choosing and reverting.