private static void PostOrder(LeetCode590Node root) { if (root == null) { return; } foreach (var child in root.children) { PostOrder(child); } results.Add(root.val); }
public static IList <int> PostOrderTraversal(LeetCode590Node root) { PostOrder(root); return(results); }