egonSchiele / grokking_algorithms

Code for the book Grokking Algorithms (https://amzn.to/29rVyHf)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with max definition on Python in chapter_4/quick_sort/max_recursive

k1borgG opened this issue · comments

If in input list last element is the biggest, the present algorithm is'n count it.

I solved this problem by changing the return in the case if length == 1 from return 1 to first element of list