經典排序算法——快速排序

對於一個int數組,請編寫一個快速排序算法,對數組元素排序。算法 給定一個int數組A及數組的大小n,請返回排序後的數組。數組 測試樣例: [1,2,3,5,2,3],6 [1,2,2,3,3,5]測試 class QuickSort { public: int* quickSort(int* A, int n) { // write code here i
相關文章
相關標籤/搜索