Failing in the efficiency test


#1

My code completed the correctness test but fails the efficiency test with a runtime Error (StackOverflow).
What can be the possible reason?


#2

Maybe your return value contains a cycle. Make sure to check for all the possible cases.


#3

Try to reverse list using INPLACE ALGO or iteratively.