Код: Выделить всё
#!/usr/bin/env python
#-*- coding:utf-8 -*-
def partition(li,start,end):
print(li)
x=li[start]
i=start-1
j=end+1
while True:
while True:
j-=1
if x>=li[j]:
break
while True:
i+=1
if x
Подробнее здесь: [url]https://stackoverflow.com/questions/26316530/hoare-partition-is-not-correct[/url]
Мобильная версия