
树
我,秦始皇的爷爷,打钱
道阻且长,行则将至
展开
-
LeetCode刷题记198-Tree(树)
面试题 04.09. 二叉搜索树序列 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { public void FF(List<Integer> a, Lis原创 2021-03-10 19:40:27 · 87 阅读 · 0 评论 -
LeetCode刷题记184-Trie(字典树/前缀树)
208. 实现 Trie (前缀树) class Trie { class TrieNode { private char val; private boolean isLeaf; TrieNode[] next; public TrieNode() { this.next = new TrieNode[26]; } public TrieNode(char val) {原创 2021-02-27 17:14:07 · 77 阅读 · 0 评论 -
LeetCode刷题记169-1028. 从先序遍历还原二叉树
LeetCode刷题记169 1028. 从先序遍历还原二叉树 题目 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val原创 2021-01-10 15:56:08 · 69 阅读 · 0 评论 -
LeetCode刷题记164-297. 二叉树的序列化与反序列化
LeetCode刷题记164 297. 二叉树的序列化与反序列化 题目 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Codec { // Encodes a tree原创 2021-01-06 14:19:14 · 103 阅读 · 0 评论