driver program to test above function
public static void Main ( ) { int [ ] arr = new int [ ] { 8 , 4 , 2 , 1 } ; int n = arr . Length ; Console . WriteLine ( " Inversion ▁ count ▁ : ▁ " + getInvCount ( arr , n ) ) ; } }