\'\'\'
def convertoDBL(root): head = None prev = None def helper(root): nonlocal head, prev if root is None: return