Meta interview question

pre order traversal iterator dfs dot product