Feb-03-2021, 02:43 AM
(Feb-03-2021, 12:11 AM)bowlofred Wrote: Imagine sorting[2, 1]
.
When you get to line 17, you'll pop the1
off of r and put it intonu
.
Sincer
is now empty, you'll then hop down to line 22, so thel
list with 2 inside is abandoned and[1]
is returned. Nothing checks at that point if elements remain inl
Awww, wait so you are saying that break doesn't just break the while, but also the for loop?