I know how solve inverse counting using merge sort and infact solved a modified problem.but I am not able to understand how to solve simple inverse counting using segment tree.I read on various site but was not able to understand,kindly help me with the idea