ADD number_inversion created by xcode, it's the first question by Stanford algorithms: Design and Analysis I