Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def finder(p1,p2, cnt):
- G.append(p1)
- if p1 == p2:
- return cnt
- print(p1,poss(p1,p2))
- if cnt > 3:
- return 0
- if p2 in poss(p1,p2):
- print("blah",cnt)
- return cnt
- else:
- for i in poss(p1,p2):
- if i not in G:
- finder(i,p2,cnt+1)
Add Comment
Please, Sign In to add comment