use quick part sort to get k maximum element