摘要: public List<Integer> inorderTraversal(TreeNode root) { List<Integer> res = new ArrayList<Integer>(); inorder(root, res); return res; } public void ino 阅读全文
posted @ 2022-02-09 22:14 明卿册 阅读(16) 评论(0) 推荐(0)
摘要: Map<Node, Node> map = new HashMap<>(); public Node copyRandomList(Node head) { if(head == null) return null; if(!map.containsKey(head)) { Node headNew 阅读全文
posted @ 2022-02-09 21:56 明卿册 阅读(27) 评论(0) 推荐(0)