#depth-first-search
Read more stories on Hashnode
Articles with this tag
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # ...