The following is the issue that was posted that I decided to work on and hopefully make a pull request.
After some research and refreshing my mind in the subject, the first step was to create a binary tree. I had to create functions to create the root of the tree, and functions to set the left and right nodes of the created root. Each function would be used every time a new node was inserted. In order to insert a new node I created a function called
insertNode() which takes the root and the new node. Then to test if the tree was created properly I had to insert values into the tree. I created a function called
insertValue() which inserts five values into the binary tree and then three function calls are made within the
insertValue() function. The first two function calls are to display the values of the binary tree. The first function call displays the values in a preoder traversal. A preorder traversal displays the node values starting with the root. Then it works its way to the left-most node displaying the values on its way. Then it goes back to the root and goes to the right-most node displaying the values on its way. The second function call displays the values in an inorder traversal. A inorder traversal displays the node values starting with the left-most node. Then it works its way to the root displaying all the other nodes, then displays the nodes going to the right of the tree.
The last function call,
height(), gets the height of the binary tree after the values have been inserted into the tree. The height of a binary tree would be the largest number of edges in a path from the root node to the leaf node. So after creating the binary tree and populating the tree with values, the height function is called which would add one every time a node was there and it would go through the function recursively.
The following image shows exactly the two traversals and the height of the binary tree.
After completing the code and testing it multiple times with different values, I made sure to make a pull request and reference the issue. The following is the link to the pull request that I made.