Skip to content

Instantly share code, notes, and snippets.

View ayush-0101's full-sized avatar

Ayush Gupta ayush-0101

View GitHub Profile
@AgarwalPragy
AgarwalPragy / printRecursionTree.py
Last active November 8, 2021 12:19
Python3 decorator for visualizing the recursion tree of a function call
from functools import wraps
import builtins
def printRecursionTree(func):
global _recursiondepth
_print = builtins.print
_recursiondepth = 0
def getpads():
if _recursiondepth == 0: