BST: esquerda < pai < direita

Cada no: val, left, right.
Menor → esquerda, maior → direita.

Big-O (balanceada): busca/insercao/remocao = O(log n)
Pior caso (desbalanceada): O(n)
Python
class TreeNode:
    def __init__(self, val):
        self.val = val
        self.left = None
        self.right = None
Python
def insert(root, val):
    if not root: return TreeNode(val)
    if val < root.val:
        root.left = insert(root.left, val)
    else:
        root.right = insert(root.right, val)
    return root
Python
def inorder(root):
    if not root: return []
    return inorder(root.left) + [root.val] + inorder(root.right)