Unable to understand from the explanation given in course


Hi all

Not able to understand above code’s logic from explanation given in course.
Please help.

Didn’t you already ask if here @sheresd? Which part do you not understand now?

I had replied on the solution on further doubt, but no one answered, hence posting again.