Similar trees
Don't include branches.
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def getLeaves(self, root: Optional[TreeNode])->list[int]:
[v, l, r] = [root.val,