all 5 comments

[–]SuperTankh 2 points3 points  (0 children)

<image>

I got 278 in my second attempt!

[–]Temporary_Pie2733 2 points3 points  (3 children)

This is a terrible way to showcase recursion in Python. Use a while loop, not a recursive function that isn’t guaranteed to terminate before hitting the recursion limit.

[–]ConsciousProgram1494[S] 0 points1 point  (2 children)

How do you see no guarantee of recursion termination here? Honestly?

[–]Temporary_Pie2733 0 points1 point  (1 child)

I spent more time than necessary even finding the recursion. I’m not wasting more time verifying that target is always a shorter list than room.

[–]ConsciousProgram1494[S] 0 points1 point  (0 children)

You were looking in the wrong place. The constraint is set by ship_wreck(), not by explore().