The most common sorting algorithm is a random reference point, and then find the array smaller than it and the array larger than it, and then recursively calculate, but this space complexity is very high, can be achieved based on the original array, exchange to achieve.
Specific reference: https://justforuse.github.io/blog/zh-cn/2020/04/quick-sort-ii/