Closed idomeisner closed 11 months ago
There is a problem with the TimSort algorithm as described here: fix #180
The problem is that in several places there was an unnecessary indentation.
for example:
while n >= RUN_LEN: last_bit |= n & 1 n >>= 1 return n + last_bit
instead of:
Things I also did:
timSort.py
timSort.py/merge
binary_search
array[0:len(array)]
array[:]
current_alg
main.py
if
display.py
There is a problem with the TimSort algorithm as described here: fix #180
The problem is that in several places there was an unnecessary indentation.
for example:
instead of:
Things I also did:
timSort.py
, so I aligned it all to spaces.timSort.py/merge
function.binary_search
was taking an extra argument that is not been used so I removed it.array[0:len(array)]
toarray[:]
.current_alg
frommain.py
.if
condition indisplay.py
.