Yandex interview question

Quicksort modification Git - how to change the last commit