Sort An Array Based On Another Array In Cpp