I\'m trying to answer this test from Geeks for Geeks to count the number of inversions some array need to be sorted. I know my code works but they need me to optimize my code in