End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
dfs that takes a node and the current path string as arguments.dfs with the left child and append the current node's character to the path string.dfs with the right child and append the current node's character to the path string.