Repository navigation
Ottobre 2020 - Lez19BT1 #46
notedo
started this conversation in
Backtracking
Replies: 1 comment
def ottobre2020(x, sol=[], i=0):
if len(x) == len(sol):
print("".join(sol))
return
for num in range(len(x)):
if str(num) != x[i]:
sol.append(str(num))
ottobre2020(x, sol, i + 1)
sol.pop() |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
All reactions