Home  >  Q&A  >  body text

python快速排序算法实现 'int' object is not iterable

巴扎黑巴扎黑2715 days ago357

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:03:37

    Thank you araraloren!
    Oh, I found the error. A low-level error: return quicksort(forehalf)+list(numbers[0])+quicksort(endhalf), list(numbers[0]) is illegal, it should be: return quicksort(forehalf)+[numbers[0]]+ quicksort(endhalf)

    reply
    0
  • Cancelreply