Untitled

 avatar
unknown
plain_text
5 days ago
260 B
2
Indexable
capacity_x=4
capacity_y=3
target=2
solution_path=water_jug_dfs(capacity_x,capacity_y,target)
if solution_path:
    print("solution found:")
    for state in solution_path:
        print(f"({state[0]},{state[1]})")
else:
    print("no solution found.")
Editor is loading...
Leave a Comment