python快排:一個pythonic的寫法

來自 http://cs231n.github.io/python-numpy-tutorial/python def quicksort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] middle
相關文章
相關標籤/搜索