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(List<Integer> treeValues)
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. 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 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. 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.s0235_lowest_common_ancestor_of_a_binary_search_tree
Methods in g0201_0300.s0235_lowest_common_ancestor_of_a_binary_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q)
Methods in g0201_0300.s0235_lowest_common_ancestor_of_a_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q)
-
Uses of TreeNode in g0201_0300.s0236_lowest_common_ancestor_of_a_binary_tree
Methods in g0201_0300.s0236_lowest_common_ancestor_of_a_binary_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q)
Methods in g0201_0300.s0236_lowest_common_ancestor_of_a_binary_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q)
-
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)
-
Uses of TreeNode in g0301_0400.s0337_house_robber_iii
Methods in g0301_0400.s0337_house_robber_iii with parameters of type TreeNode Modifier and Type Method Description int
Solution. rob(TreeNode root)
-
Uses of TreeNode in g0401_0500.s0404_sum_of_left_leaves
Methods in g0401_0500.s0404_sum_of_left_leaves with parameters of type TreeNode Modifier and Type Method Description int
Solution. sumOfLeftLeaves(TreeNode root)
-
Uses of TreeNode in g0401_0500.s0437_path_sum_iii
Methods in g0401_0500.s0437_path_sum_iii with parameters of type TreeNode Modifier and Type Method Description void
Solution. helper(TreeNode node, int targetSum, long currSum)
int
Solution. pathSum(TreeNode root, int targetSum)
-
Uses of TreeNode in g0401_0500.s0449_serialize_and_deserialize_bst
Methods in g0401_0500.s0449_serialize_and_deserialize_bst that return TreeNode Modifier and Type Method Description TreeNode
Codec. deserialize(String data)
Methods in g0401_0500.s0449_serialize_and_deserialize_bst with parameters of type TreeNode Modifier and Type Method Description String
Codec. serialize(TreeNode root)
-
Uses of TreeNode in g0401_0500.s0450_delete_node_in_a_bst
Methods in g0401_0500.s0450_delete_node_in_a_bst that return TreeNode Modifier and Type Method Description TreeNode
Solution. deleteNode(TreeNode root, int key)
Methods in g0401_0500.s0450_delete_node_in_a_bst with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. deleteNode(TreeNode root, int key)
-
Uses of TreeNode in g0501_0600.s0501_find_mode_in_binary_search_tree
Methods in g0501_0600.s0501_find_mode_in_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description int[]
Solution. findMode(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0508_most_frequent_subtree_sum
Methods in g0501_0600.s0508_most_frequent_subtree_sum with parameters of type TreeNode Modifier and Type Method Description int[]
Solution. findFrequentTreeSum(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0513_find_bottom_left_tree_value
Methods in g0501_0600.s0513_find_bottom_left_tree_value with parameters of type TreeNode Modifier and Type Method Description int
Solution. findBottomLeftValue(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0515_find_largest_value_in_each_tree_row
Methods in g0501_0600.s0515_find_largest_value_in_each_tree_row with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. largestValues(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0530_minimum_absolute_difference_in_bst
Methods in g0501_0600.s0530_minimum_absolute_difference_in_bst with parameters of type TreeNode Modifier and Type Method Description int
Solution. getMinimumDifference(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0538_convert_bst_to_greater_tree
Methods in g0501_0600.s0538_convert_bst_to_greater_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. convertBST(TreeNode root)
Methods in g0501_0600.s0538_convert_bst_to_greater_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. convertBST(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0543_diameter_of_binary_tree
Methods in g0501_0600.s0543_diameter_of_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. diameterOfBinaryTree(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0563_binary_tree_tilt
Methods in g0501_0600.s0563_binary_tree_tilt with parameters of type TreeNode Modifier and Type Method Description int
Solution. findTilt(TreeNode root)
-
Uses of TreeNode in g0501_0600.s0572_subtree_of_another_tree
Methods in g0501_0600.s0572_subtree_of_another_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isSubtree(TreeNode root, TreeNode subRoot)
-
Uses of TreeNode in g0601_0700.s0606_construct_string_from_binary_tree
Methods in g0601_0700.s0606_construct_string_from_binary_tree with parameters of type TreeNode Modifier and Type Method Description String
Solution. tree2str(TreeNode t)
-
Uses of TreeNode in g0601_0700.s0617_merge_two_binary_trees
Methods in g0601_0700.s0617_merge_two_binary_trees that return TreeNode Modifier and Type Method Description TreeNode
Solution. mergeTrees(TreeNode root1, TreeNode root2)
Methods in g0601_0700.s0617_merge_two_binary_trees with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. mergeTrees(TreeNode root1, TreeNode root2)
-
Uses of TreeNode in g0601_0700.s0623_add_one_row_to_tree
Methods in g0601_0700.s0623_add_one_row_to_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. addOneRow(TreeNode root, int val, int depth)
Methods in g0601_0700.s0623_add_one_row_to_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. addOneRow(TreeNode root, int val, int depth)
-
Uses of TreeNode in g0601_0700.s0637_average_of_levels_in_binary_tree
Methods in g0601_0700.s0637_average_of_levels_in_binary_tree with parameters of type TreeNode Modifier and Type Method Description List<Double>
Solution. averageOfLevels(TreeNode root)
-
Uses of TreeNode in g0601_0700.s0652_find_duplicate_subtrees
Methods in g0601_0700.s0652_find_duplicate_subtrees that return types with arguments of type TreeNode Modifier and Type Method Description List<TreeNode>
Solution. findDuplicateSubtrees(TreeNode root)
Methods in g0601_0700.s0652_find_duplicate_subtrees with parameters of type TreeNode Modifier and Type Method Description List<TreeNode>
Solution. findDuplicateSubtrees(TreeNode root)
-
Uses of TreeNode in g0601_0700.s0653_two_sum_iv_input_is_a_bst
Methods in g0601_0700.s0653_two_sum_iv_input_is_a_bst with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. findTarget(TreeNode root, int k)
-
Uses of TreeNode in g0601_0700.s0654_maximum_binary_tree
Methods in g0601_0700.s0654_maximum_binary_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. constructMaximumBinaryTree(int[] nums)
-
Uses of TreeNode in g0601_0700.s0655_print_binary_tree
Methods in g0601_0700.s0655_print_binary_tree with parameters of type TreeNode Modifier and Type Method Description List<List<String>>
Solution. printTree(TreeNode root)
-
Uses of TreeNode in g0601_0700.s0662_maximum_width_of_binary_tree
Methods in g0601_0700.s0662_maximum_width_of_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. widthOfBinaryTree(TreeNode root)
-
Uses of TreeNode in g0601_0700.s0669_trim_a_binary_search_tree
Methods in g0601_0700.s0669_trim_a_binary_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. trimBST(TreeNode root, int l, int r)
Methods in g0601_0700.s0669_trim_a_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. trimBST(TreeNode root, int l, int r)
-
Uses of TreeNode in g0601_0700.s0671_second_minimum_node_in_a_binary_tree
Methods in g0601_0700.s0671_second_minimum_node_in_a_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. findSecondMinimumValue(TreeNode root)
-
Uses of TreeNode in g0601_0700.s0687_longest_univalue_path
Methods in g0601_0700.s0687_longest_univalue_path with parameters of type TreeNode Modifier and Type Method Description int
Solution. longestUnivaluePath(TreeNode root)
-
Uses of TreeNode in g0601_0700.s0700_search_in_a_binary_search_tree
Methods in g0601_0700.s0700_search_in_a_binary_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. searchBST(TreeNode root, int val)
Methods in g0601_0700.s0700_search_in_a_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. searchBST(TreeNode root, int val)
-
Uses of TreeNode in g0701_0800.s0701_insert_into_a_binary_search_tree
Methods in g0701_0800.s0701_insert_into_a_binary_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. insertIntoBST(TreeNode root, int val)
Methods in g0701_0800.s0701_insert_into_a_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. insertIntoBST(TreeNode root, int val)
-
Uses of TreeNode in g0701_0800.s0783_minimum_distance_between_bst_nodes
Methods in g0701_0800.s0783_minimum_distance_between_bst_nodes with parameters of type TreeNode Modifier and Type Method Description int
Solution. minDiffInBST(TreeNode root)
-
Uses of TreeNode in g0801_0900.s0814_binary_tree_pruning
Methods in g0801_0900.s0814_binary_tree_pruning that return TreeNode Modifier and Type Method Description TreeNode
Solution. pruneTree(TreeNode root)
Methods in g0801_0900.s0814_binary_tree_pruning with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. pruneTree(TreeNode root)
-
Uses of TreeNode in g0801_0900.s0863_all_nodes_distance_k_in_binary_tree
Methods in g0801_0900.s0863_all_nodes_distance_k_in_binary_tree with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. distanceK(TreeNode root, TreeNode target, int k)
-
Uses of TreeNode in g0801_0900.s0865_smallest_subtree_with_all_the_deepest_nodes
Methods in g0801_0900.s0865_smallest_subtree_with_all_the_deepest_nodes that return TreeNode Modifier and Type Method Description TreeNode
Solution. subtreeWithAllDeepest(TreeNode root)
Methods in g0801_0900.s0865_smallest_subtree_with_all_the_deepest_nodes with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. subtreeWithAllDeepest(TreeNode root)
-
Uses of TreeNode in g0801_0900.s0872_leaf_similar_trees
Methods in g0801_0900.s0872_leaf_similar_trees with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. leafSimilar(TreeNode root1, TreeNode root2)
-
Uses of TreeNode in g0801_0900.s0889_construct_binary_tree_from_preorder_and_postorder_traversal
Methods in g0801_0900.s0889_construct_binary_tree_from_preorder_and_postorder_traversal that return TreeNode Modifier and Type Method Description TreeNode
Solution. constructFromPrePost(int[] preorder, int[] postorder)
-
Uses of TreeNode in g0801_0900.s0897_increasing_order_search_tree
Methods in g0801_0900.s0897_increasing_order_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. increasingBST(TreeNode root)
Methods in g0801_0900.s0897_increasing_order_search_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. increasingBST(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0919_complete_binary_tree_inserter
Methods in g0901_1000.s0919_complete_binary_tree_inserter that return TreeNode Modifier and Type Method Description TreeNode
CBTInserter. getRoot()
Constructors in g0901_1000.s0919_complete_binary_tree_inserter with parameters of type TreeNode Constructor Description CBTInserter(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0938_range_sum_of_bst
Methods in g0901_1000.s0938_range_sum_of_bst with parameters of type TreeNode Modifier and Type Method Description int
Solution. rangeSumBST(TreeNode root, int low, int high)
-
Uses of TreeNode in g0901_1000.s0951_flip_equivalent_binary_trees
Methods in g0901_1000.s0951_flip_equivalent_binary_trees with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. flipEquiv(TreeNode root1, TreeNode root2)
-
Uses of TreeNode in g0901_1000.s0958_check_completeness_of_a_binary_tree
Methods in g0901_1000.s0958_check_completeness_of_a_binary_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isCompleteTree(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0965_univalued_binary_tree
Methods in g0901_1000.s0965_univalued_binary_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isUnivalTree(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0968_binary_tree_cameras
Methods in g0901_1000.s0968_binary_tree_cameras with parameters of type TreeNode Modifier and Type Method Description int
Solution. minCameraCover(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0971_flip_binary_tree_to_match_preorder_traversal
Methods in g0901_1000.s0971_flip_binary_tree_to_match_preorder_traversal with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. flipMatchVoyage(TreeNode root, int[] voyage)
-
Uses of TreeNode in g0901_1000.s0979_distribute_coins_in_binary_tree
Methods in g0901_1000.s0979_distribute_coins_in_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. distributeCoins(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0987_vertical_order_traversal_of_a_binary_tree
Methods in g0901_1000.s0987_vertical_order_traversal_of_a_binary_tree with parameters of type TreeNode Modifier and Type Method Description List<List<Integer>>
Solution. verticalTraversal(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0988_smallest_string_starting_from_leaf
Methods in g0901_1000.s0988_smallest_string_starting_from_leaf with parameters of type TreeNode Modifier and Type Method Description String
Solution. smallestFromLeaf(TreeNode root)
-
Uses of TreeNode in g0901_1000.s0993_cousins_in_binary_tree
Methods in g0901_1000.s0993_cousins_in_binary_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isCousins(TreeNode root, int x, int y)
-
Uses of TreeNode in g0901_1000.s0998_maximum_binary_tree_ii
Methods in g0901_1000.s0998_maximum_binary_tree_ii that return TreeNode Modifier and Type Method Description TreeNode
Solution. insertIntoMaxTree(TreeNode root, int val)
Methods in g0901_1000.s0998_maximum_binary_tree_ii with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. insertIntoMaxTree(TreeNode root, int val)
-
Uses of TreeNode in g1001_1100.s1008_construct_binary_search_tree_from_preorder_traversal
Methods in g1001_1100.s1008_construct_binary_search_tree_from_preorder_traversal that return TreeNode Modifier and Type Method Description TreeNode
Solution. bstFromPreorder(int[] preorder)
-
Uses of TreeNode in g1001_1100.s1022_sum_of_root_to_leaf_binary_numbers
Methods in g1001_1100.s1022_sum_of_root_to_leaf_binary_numbers with parameters of type TreeNode Modifier and Type Method Description int
Solution. sumRootToLeaf(TreeNode root)
-
Uses of TreeNode in g1001_1100.s1026_maximum_difference_between_node_and_ancestor
Methods in g1001_1100.s1026_maximum_difference_between_node_and_ancestor with parameters of type TreeNode Modifier and Type Method Description int
Solution. maxAncestorDiff(TreeNode root)
-
Uses of TreeNode in g1001_1100.s1028_recover_a_tree_from_preorder_traversal
Methods in g1001_1100.s1028_recover_a_tree_from_preorder_traversal that return TreeNode Modifier and Type Method Description TreeNode
Solution. recoverFromPreorder(String traversal)
-
Uses of TreeNode in g1001_1100.s1038_binary_search_tree_to_greater_sum_tree
Methods in g1001_1100.s1038_binary_search_tree_to_greater_sum_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. bstToGst(TreeNode root)
Methods in g1001_1100.s1038_binary_search_tree_to_greater_sum_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. bstToGst(TreeNode root)
-
Uses of TreeNode in g1001_1100.s1080_insufficient_nodes_in_root_to_leaf_paths
Methods in g1001_1100.s1080_insufficient_nodes_in_root_to_leaf_paths that return TreeNode Modifier and Type Method Description TreeNode
Solution. sufficientSubset(TreeNode root, int limit)
Methods in g1001_1100.s1080_insufficient_nodes_in_root_to_leaf_paths with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. sufficientSubset(TreeNode root, int limit)
int
Solution. sufficientSubset(TreeNode root, int limit, int sum, boolean isLeaf)
-
Uses of TreeNode in g1101_1200.s1110_delete_nodes_and_return_forest
Methods in g1101_1200.s1110_delete_nodes_and_return_forest that return types with arguments of type TreeNode Modifier and Type Method Description List<TreeNode>
Solution. delNodes(TreeNode root, int[] localToDelete)
Methods in g1101_1200.s1110_delete_nodes_and_return_forest with parameters of type TreeNode Modifier and Type Method Description List<TreeNode>
Solution. delNodes(TreeNode root, int[] localToDelete)
-
Uses of TreeNode in g1101_1200.s1123_lowest_common_ancestor_of_deepest_leaves
Methods in g1101_1200.s1123_lowest_common_ancestor_of_deepest_leaves that return TreeNode Modifier and Type Method Description TreeNode
Solution. lcaDeepestLeaves(TreeNode root)
Methods in g1101_1200.s1123_lowest_common_ancestor_of_deepest_leaves with parameters of type TreeNode Modifier and Type Method Description int
Solution. getDep(TreeNode root)
TreeNode
Solution. lcaDeepestLeaves(TreeNode root)
-
Uses of TreeNode in g1101_1200.s1145_binary_tree_coloring_game
Methods in g1101_1200.s1145_binary_tree_coloring_game with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. btreeGameWinningMove(TreeNode root, int n, int x)
-
Uses of TreeNode in g1101_1200.s1161_maximum_level_sum_of_a_binary_tree
Methods in g1101_1200.s1161_maximum_level_sum_of_a_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. maxLevelSum(TreeNode root)
-
Uses of TreeNode in g1201_1300.s1261_find_elements_in_a_contaminated_binary_tree
Constructors in g1201_1300.s1261_find_elements_in_a_contaminated_binary_tree with parameters of type TreeNode Constructor Description FindElements(TreeNode root)
-
Uses of TreeNode in g1301_1400.s1302_deepest_leaves_sum
Methods in g1301_1400.s1302_deepest_leaves_sum with parameters of type TreeNode Modifier and Type Method Description int
Solution. deepestLeavesSum(TreeNode root)
-
Uses of TreeNode in g1301_1400.s1305_all_elements_in_two_binary_search_trees
Methods in g1301_1400.s1305_all_elements_in_two_binary_search_trees with parameters of type TreeNode Modifier and Type Method Description List<Integer>
Solution. getAllElements(TreeNode root1, TreeNode root2)
-
Uses of TreeNode in g1301_1400.s1315_sum_of_nodes_with_even_valued_grandparent
Methods in g1301_1400.s1315_sum_of_nodes_with_even_valued_grandparent with parameters of type TreeNode Modifier and Type Method Description int
Solution. sumEvenGrandparent(TreeNode root)
-
Uses of TreeNode in g1301_1400.s1325_delete_leaves_with_a_given_value
Methods in g1301_1400.s1325_delete_leaves_with_a_given_value that return TreeNode Modifier and Type Method Description TreeNode
Solution. removeLeafNodes(TreeNode root, int target)
Methods in g1301_1400.s1325_delete_leaves_with_a_given_value with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. removeLeafNodes(TreeNode root, int target)
-
Uses of TreeNode in g1301_1400.s1339_maximum_product_of_splitted_binary_tree
Methods in g1301_1400.s1339_maximum_product_of_splitted_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. maxProduct(TreeNode root)
int
Solution. sumTree(TreeNode node)
-
Uses of TreeNode in g1301_1400.s1367_linked_list_in_binary_tree
Methods in g1301_1400.s1367_linked_list_in_binary_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isSubPath(ListNode head, TreeNode root)
-
Uses of TreeNode in g1301_1400.s1372_longest_zigzag_path_in_a_binary_tree
Methods in g1301_1400.s1372_longest_zigzag_path_in_a_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. longestZigZag(TreeNode root)
-
Uses of TreeNode in g1301_1400.s1373_maximum_sum_bst_in_binary_tree
Methods in g1301_1400.s1373_maximum_sum_bst_in_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. maxSumBST(TreeNode root)
-
Uses of TreeNode in g1301_1400.s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree
Methods in g1301_1400.s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. getTargetCopy(TreeNode original, TreeNode cloned, TreeNode target)
Methods in g1301_1400.s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. getTargetCopy(TreeNode original, TreeNode cloned, TreeNode target)
-
Uses of TreeNode in g1301_1400.s1382_balance_a_binary_search_tree
Methods in g1301_1400.s1382_balance_a_binary_search_tree that return TreeNode Modifier and Type Method Description TreeNode
Solution. balanceBST(TreeNode root)
Methods in g1301_1400.s1382_balance_a_binary_search_tree with parameters of type TreeNode Modifier and Type Method Description TreeNode
Solution. balanceBST(TreeNode root)
-
Uses of TreeNode in g1401_1500.s1448_count_good_nodes_in_binary_tree
Methods in g1401_1500.s1448_count_good_nodes_in_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. goodNodes(TreeNode root)
-
Uses of TreeNode in g1401_1500.s1457_pseudo_palindromic_paths_in_a_binary_tree
Methods in g1401_1500.s1457_pseudo_palindromic_paths_in_a_binary_tree with parameters of type TreeNode Modifier and Type Method Description int
Solution. pseudoPalindromicPaths(TreeNode root)
-
Uses of TreeNode in g1501_1600.s1530_number_of_good_leaf_nodes_pairs
Methods in g1501_1600.s1530_number_of_good_leaf_nodes_pairs with parameters of type TreeNode Modifier and Type Method Description int
Solution. countPairs(TreeNode root, int distance)
-
Uses of TreeNode in g1601_1700.s1609_even_odd_tree
Methods in g1601_1700.s1609_even_odd_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. isEvenOddTree(TreeNode root)
-
Uses of TreeNode in g1901_2000.s1932_merge_bsts_to_create_single_bst
Methods in g1901_2000.s1932_merge_bsts_to_create_single_bst that return TreeNode Modifier and Type Method Description TreeNode
Solution. canMerge(List<TreeNode> trees)
Method parameters in g1901_2000.s1932_merge_bsts_to_create_single_bst with type arguments of type TreeNode Modifier and Type Method Description TreeNode
Solution. canMerge(List<TreeNode> trees)
-
Uses of TreeNode in g2001_2100.s2096_step_by_step_directions_from_a_binary_tree_node_to_another
Methods in g2001_2100.s2096_step_by_step_directions_from_a_binary_tree_node_to_another with parameters of type TreeNode Modifier and Type Method Description String
Solution. getDirections(TreeNode root, int startValue, int destValue)
-
Uses of TreeNode in g2101_2200.s2196_create_binary_tree_from_descriptions
Methods in g2101_2200.s2196_create_binary_tree_from_descriptions that return TreeNode Modifier and Type Method Description TreeNode
Solution. createBinaryTree(int[][] descriptions)
-
Uses of TreeNode in g2201_2300.s2236_root_equals_sum_of_children
Methods in g2201_2300.s2236_root_equals_sum_of_children with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. checkTree(TreeNode root)
-
Uses of TreeNode in g2201_2300.s2265_count_nodes_equal_to_average_of_subtree
Methods in g2201_2300.s2265_count_nodes_equal_to_average_of_subtree with parameters of type TreeNode Modifier and Type Method Description int
Solution. averageOfSubtree(TreeNode root)
-
Uses of TreeNode in g2301_2400.s2331_evaluate_boolean_binary_tree
Methods in g2301_2400.s2331_evaluate_boolean_binary_tree with parameters of type TreeNode Modifier and Type Method Description boolean
Solution. evaluateTree(TreeNode root)
-
Uses of TreeNode in g2301_2400.s2385_amount_of_time_for_binary_tree_to_be_infected
Methods in g2301_2400.s2385_amount_of_time_for_binary_tree_to_be_infected with parameters of type TreeNode Modifier and Type Method Description int
Solution. amountOfTime(TreeNode root, int start)
-