inverse pair counting
Adding inverse pair counting