zhedahht / CodingInterviewChinese2

《剑指Offer:名企面试官精讲典型编程面试题》第二版源代码
Other
5.32k stars 2.17k forks source link

Partition function has extremely bad performance for array with identical values #72

Open auntyellow opened 4 years ago

auntyellow commented 4 years ago

Implemented QuickSort by this Partition in this book, given a large array with identical values, we get either a performance of O(n^2), or StackOverflow.