I guess it works with the riddle as formulated, but the true solution has to use the actual switch function.
If the dating partner solves it, then for extra credit, have them give a solution taking time proportional to the length of the loop.
I guess it works with the riddle as formulated, but the true solution has to use the actual switch function.
If the dating partner solves it, then for extra credit, have them give a solution taking time proportional to the length of the loop.