Bentley Systems Interview Question

Traverse a tree both iteratively and recursively.