Uses of Class
com_github_leetcode.TreeNode
-
-
Uses of TreeNode in com_github_leetcode
Fields in com_github_leetcode declared as TreeNode Modifier and Type Field Description TreeNode
TreeNode. left
TreeNode
TreeNode. right
Methods in com_github_leetcode that return TreeNode Modifier and Type Method Description static TreeNode
TreeNode. create(int[] arr)
Constructors in com_github_leetcode with parameters of type TreeNode Constructor Description TreeNode(int val, TreeNode left, TreeNode right)
-
Uses of TreeNode in g0001_0100.s0094_binary_tree_inorder_traversal
Methods in g0001_0100.s0094_binary_tree_inorder_traversal with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. inorderTraversal(TreeNode root)
void
Solution. inorderTraversal(TreeNode root, List<Integer> answer)
-
Uses of TreeNode in g0001_0100.s0095_unique_binary_search_trees_ii
Methods in g0001_0100.s0095_unique_binary_search_trees_ii that return types with arguments of type TreeNode Modifier and Type Method Description List<TreeNode>
Solution. generateTrees(int n)
-
Uses of TreeNode in g0001_0100.s0098_validate_binary_search_tree
Methods in g0001_0100.s0098_validate_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isValidBST(TreeNode root)
-
Uses of TreeNode in g0001_0100.s0099_recover_binary_search_tree
Methods in g0001_0100.s0099_recover_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description void
Solution. recoverTree(TreeNode root)
-
Uses of TreeNode in g0001_0100.s0100_same_tree
Methods in g0001_0100.s0100_same_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isSameTree(TreeNode p, TreeNode q)
-
Uses of TreeNode in g0101_0200.s0101_symmetric_tree
Methods in g0101_0200.s0101_symmetric_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isSymmetric(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0102_binary_tree_level_order_traversal
Methods in g0101_0200.s0102_binary_tree_level_order_traversal with parameters of type TreeNode Modifier and Type Method Description List<List<Integer>>
Solution. levelOrder(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0103_binary_tree_zigzag_level_order_traversal
Methods in g0101_0200.s0103_binary_tree_zigzag_level_order_traversal with parameters of type TreeNode Modifier and Type Method Description List<List<Integer>>
Solution. zigzagLevelOrder(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0104_maximum_depth_of_binary_tree
Methods in g0101_0200.s0104_maximum_depth_of_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. maxDepth(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0105_construct_binary_tree_from_preorder_and_inorder_traversal
Methods in g0101_0200.s0105_construct_binary_tree_from_preorder_and_inorder_traversal that return TreeNode Modifier and Type Method Description TreeNode
Solution. buildTree(int[] preorder, int[] inorder)
-
Uses of TreeNode in g0101_0200.s0106_construct_binary_tree_from_inorder_and_postorder_traversal
Methods in g0101_0200.s0106_construct_binary_tree_from_inorder_and_postorder_traversal that return TreeNode Modifier and Type Method Description TreeNode
Solution. buildTree(int[] inorder, int[] postorder)
-
Uses of TreeNode in g0101_0200.s0107_binary_tree_level_order_traversal_ii
Methods in g0101_0200.s0107_binary_tree_level_order_traversal_ii with parameters of type TreeNode Modifier and Type Method Description void
Solution. getOrder(TreeNode root, int level)
List<List<Integer>>
Solution. levelOrderBottom(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0108_convert_sorted_array_to_binary_search_tree
Methods in g0101_0200.s0108_convert_sorted_array_to_binary_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. makeTree(int[] num, int left, int right)
TreeNode
Solution. sortedArrayToBST(int[] num)
-
Uses of TreeNode in g0101_0200.s0109_convert_sorted_list_to_binary_search_tree
Methods in g0101_0200.s0109_convert_sorted_list_to_binary_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. sortedListToBST(ListNode head)
-
Uses of TreeNode in g0101_0200.s0110_balanced_binary_tree
Methods in g0101_0200.s0110_balanced_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. getMaxHeight(TreeNode root)
boolean
Solution. isBalanced(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0111_minimum_depth_of_binary_tree
Methods in g0101_0200.s0111_minimum_depth_of_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. minDepth(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0112_path_sum
Methods in g0101_0200.s0112_path_sum with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. hasPathSum(TreeNode root, int sum)
-
Uses of TreeNode in g0101_0200.s0113_path_sum_ii
Methods in g0101_0200.s0113_path_sum_ii with parameters of type TreeNode Modifier and Type Method Description List<List<Integer>>
Solution. pathSum(TreeNode root, int targetSum)
-
Uses of TreeNode in g0101_0200.s0114_flatten_binary_tree_to_linked_list
Methods in g0101_0200.s0114_flatten_binary_tree_to_linked_list with parameters of type TreeNode Modifier and Type Method Description void
Solution. flatten(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0124_binary_tree_maximum_path_sum
Methods in g0101_0200.s0124_binary_tree_maximum_path_sum with parameters of type TreeNode Modifier and Type Method Description int
Solution. findMaxPathSum(TreeNode root)
int
Solution. maxPathSum(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0129_sum_root_to_leaf_numbers
Methods in g0101_0200.s0129_sum_root_to_leaf_numbers with parameters of type TreeNode Modifier and Type Method Description int
Solution. sumNumbers(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0144_binary_tree_preorder_traversal
Methods in g0101_0200.s0144_binary_tree_preorder_traversal with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. preorderTraversal(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0145_binary_tree_postorder_traversal
Methods in g0101_0200.s0145_binary_tree_postorder_traversal with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. postorderTraversal(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0173_binary_search_tree_iterator
Constructors in g0101_0200.s0173_binary_search_tree_iterator with parameters of type TreeNode Constructor Description BSTIterator(TreeNode root)
-
Uses of TreeNode in g0101_0200.s0199_binary_tree_right_side_view
Methods in g0101_0200.s0199_binary_tree_right_side_view with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. rightSideView(TreeNode root)
-
Uses of TreeNode in g0201_0300.s0222_count_complete_tree_nodes
Methods in g0201_0300.s0222_count_complete_tree_nodes with parameters of type TreeNode Modifier and Type Method Description int
Solution. countNodes(TreeNode root)
-
Uses of TreeNode in g0201_0300.s0226_invert_binary_tree
Methods in g0201_0300.s0226_invert_binary_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. invertTree(TreeNode root)
Methods in g0201_0300.s0226_invert_binary_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. invertTree(TreeNode root)
-
Uses of TreeNode in g0201_0300.s0230_kth_smallest_element_in_a_bst
Methods in g0201_0300.s0230_kth_smallest_element_in_a_bst with parameters of type TreeNode Modifier and Type Method Description int
Solution. kthSmallest(TreeNode root, int k)
-
Uses of TreeNode in g0201_0300.s0257_binary_tree_paths
Methods in g0201_0300.s0257_binary_tree_paths with parameters of type TreeNode Modifier and Type Method Description List<String>
Solution. binaryTreePaths(TreeNode root)
-
Uses of TreeNode in g0201_0300.s0297_serialize_and_deserialize_binary_tree
Methods in g0201_0300.s0297_serialize_and_deserialize_binary_tree that return TreeNode Modifier and Type Method Description TreeNode
Codec. deserialize(String data)
Methods in g0201_0300.s0297_serialize_and_deserialize_binary_tree with parameters of type TreeNode Modifier and Type Method Description String
Codec. serialize(TreeNode root)
void
Codec. serialize(TreeNode root, StringBuilder sb)
-