In this video counting inversion using merge sort I have discussed what is merge sort and inversion is, how to approach the problem.
first we will learn basic merge sort and will point out where inversion occurs and in the second part I have written code for this problem.
Things which we need to keep in mind for merge sort.
1. divide the array
2.divide it recursively
3. merge array
4.count the inversion
if you are someone who is trying to solve all the problems from hackerrank interview preparation kit playlist and getting stuck anywhere or looking for optimized solution do check my playlist
[ Ссылка ]
Link for second part :
Ещё видео!