Feb-03-2021, 12:11 AM
Imagine sorting
When you get to line 17, you'll pop the
Since
[2, 1]
.When you get to line 17, you'll pop the
1
off of r and put it into nu
.Since
r
is now empty, you'll then hop down to line 22, so the l
list with 2 inside is abandoned and [1]
is returned. Nothing checks at that point if elements remain in l