ChatGPT - Quick Sort Function