Skip to content

Instantly share code, notes, and snippets.

@vamsitallapudi
Created December 18, 2020 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vamsitallapudi/408d99e7470af5390966262ee330a369 to your computer and use it in GitHub Desktop.
Save vamsitallapudi/408d99e7470af5390966262ee330a369 to your computer and use it in GitHub Desktop.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
def initializeBinaryTree() -> TreeNode:
a = TreeNode(2)
b = TreeNode(3)
c = TreeNode(1, a, b)
return c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment