Steps to run: git clone https://github.com/cristitoma/trip-sorter.git composer install php console.php (for demo application) ./vendor/bin/phpunit (to run tests) The sort algorithm has a complexity of O(n/2).