Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Rotate and check all solution in Clear category for Rotate Hole by kkkkk
def rotate(state, pipe_numbers):
"""Return list of rotatations that satisfy pipe numbers."""
matches = []
for rotate_num in range(len(state)):
if all(state[pipe_num] for pipe_num in pipe_numbers):
matches.append(rotate_num)
state = state[-1:] + state[0:-1]
return matches
Jan. 19, 2020