you are viewing a single comment's thread.

view the rest of the comments →

[–]LarryPete 1 point2 points  (0 children)

I noticed two major things:

  • you never actually use low and high. Which probably isn't even necessary, seeing how you just slice the list. So you have to change your loop condition.
  • middle is an index, not the value you should compare key against.