iterateTree method
Print all the nodes in the tree.
Implementation
static void iterateTree(TreeNode pointer) {
print("${Node.generateIndentation(pointer.level)}${pointer.value}");
pointer.children.forEach((f) => iterateTree(f));
}
Print all the nodes in the tree.
static void iterateTree(TreeNode pointer) {
print("${Node.generateIndentation(pointer.level)}${pointer.value}");
pointer.children.forEach((f) => iterateTree(f));
}