Question d’entretien chez Bloomberg

They asked me to code a problem that was based on inversions algorithms.