A problem based on inversions in a permutation