Meta Interview Question

pre order traversal iterator dfs dot product