Driver code
public static void Main ( String [ ] args ) { int [ ] arr = { 8 , 4 , 2 , 1 } ; int n = arr . Length ; Console . Write ( " Number ▁ of ▁ inversions ▁ are ▁ : ▁ " + getInvCount ( arr , n ) ) ; } }