## How to compute the sum and the total number of nodes in a Binary Search Tree?

I am trying to figure out a way to compute the sum and the total number of nodes in a BST, Binary Search Tree. I assume that the values of the nodes are all numerical. I have made the following code …

## How do I sort a Binary Search Tree from greatest to least?

I need to return an array of nodes sorted from high to low. At the moment I am trying to implement an inorder traversal which gives me the exact opposite of what I’m looking for. The tree looks like: …

## Binary Search Tree Traversals failed to execute when using recursion

I am new to Java programming and data structures. Nevertheless I could implement the following code after so many efforts. There I need to insert values to nodes, and print the values in each node to …

## Recursive PrintTree() method for binary search trees not correctly printing

I’m writing standard code for creating a binary search tree in Python from a list L. The idea is to recursively print the tree in the format (data, left_subtree, right_subtree). It works with every …

## Determine the Highest Level that is Full – Binary Search Tree

I have a project do and I have everything done except for where I need to find the highest level that has the maximum amount of nodes in it. This is the code that I have, but I can’t seem to figure …

## BST Contains method not working properly in JAVA

I’m writing a method to see if a value exists in a BST. public boolean contains(int val){ return containsHelper(val, root); } public boolean containsHelper(int val, Node root){ …