Binary Tree

How to solve Binary Tree questions:

Think about the relationship between the result on left/right child and the result on the whole tree.

Time complexity: number of nodes * time complexity on each node O(1) = O(n)

Never go back, so the time complexity on each node is O(1)

results matching ""

    No results matching ""