摘要:
今天是一道先序遍历二叉树的题目 先看题目 递归的思路比较简单,先考虑使用递归的方法解题 方法1:递归 1 /** 2 * Definition for a binary tree node. 3 * public class TreeNode { 4 * int val; 5 * TreeNode 阅读全文
摘要:
今天的题目如下 1.递归解法,思路较为简单 1 /* 2 // Definition for a Node. 3 class Node { 4 public int val; 5 public List<Node> children; 6 7 public Node() {} 8 9 public 阅读全文