Need help with the dsa learning series problem
The above link is for my submission to the question:

I am getting partially correct answer though i believe the logic is sound. Could someone please help me with this?

Maybe take a look at this -
I’m having a hard time reading the Python script.

Thanks a lot! Although i’m still unable to understand why mine isn’t accepted. I believe mine is implemented in the reverse order but it is the same thing.