Various Sorting Models work including algorithm implemented in R/C++