class Node:
def __init__(self, value):
self.key = value # the key of the node
self.parent = None # the pointer to the parent node
self.left = None # the pointer to the left child node
self.right = None # the pointer to the right child node
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter