MCPcopy Create free account
hub / github.com/BeeBombshell/Python-DSA / TowerofHonai

Function TowerofHonai

Recursion/Tower_of_Honai.py:2–7  ·  view source on GitHub ↗
(n, src, dest ,hel)

Source from the content-addressed store, hash-verified

1#Program to Implement Tower of Honai Puzzel
2def TowerofHonai(n, src, dest ,hel):
3 if(n==0):
4 return
5 TowerofHonai(n-1,src,hel,dest)
6 print("move from",src,"to",dest)
7 TowerofHonai(n-1,hel,dest,src)
8
9# n - Number of disks in Source Tower
10n = int(input("Enter number of Disks: "))

Callers 1

Tower_of_Honai.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected