What Should I do ...?

Which data structure should I use . And What Algorithm Should I apply.How to approch this problem

Hey @anuranjan8319918906, the gist of this problem is same as inversion count, try thinking in terms of merge sort algorithm and you’ll be good to go :slight_smile: .