Uses of Class
Struct.BSTNode
Packages that use BSTNode
Package
Description
The
Struct
package is a versatile collection of data structures designed for
competitive programming.-
Uses of BSTNode in Struct
Modifier and TypeFieldDescriptionBSTNode.left
This node's left child node, or null if not present.BSTNode.right
This node's right child node, or null if not present.Modifier and TypeMethodDescriptionvoid
Adds a node to the correct position in the subtree.Modifier and TypeMethodDescription<R> R
BSTNode.accumulateInOrder
(R initial, Function<BSTNode<T>, R> function, BiFunction<R, R, R> accumulator) Aggregates results across the BST nodes using an inorder traversal.<R> R
BSTNode.accumulatePostOrder
(R initial, Function<BSTNode<T>, R> function, BiFunction<R, R, R> accumulator) Aggregates results across the BST nodes using a postorder traversal.<R> R
BSTNode.accumulatePreOrder
(R initial, Function<BSTNode<T>, R> function, BiFunction<R, R, R> accumulator) Aggregates results across the BST nodes using a preorder traversal.void
BSTNode.executeInOrder
(Consumer<BSTNode<T>> action) Executes a consumer function on each node in the BST following an inorder traversal.void
BSTNode.executePostOrder
(Consumer<BSTNode<T>> action) Executes a consumer function on each node in the BST following a postorder traversal.void
BSTNode.executePreOrder
(Consumer<BSTNode<T>> action) Executes a consumer function on each node in the BST following a preorder traversal.