hacker rank quick sort