{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Additional+Coding+Practice - This coding problem is longer...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
This coding problem is longer than the ones that will be on the actual test. When you do these problems, try to do them without looking at lecture code first. Then if you get stuck look to the code for reference. You have all have a C compiler, so run your code to see if it is correct. If it isn't, figure out why and fix it! A) Write the structure definitions for a singly linked list's Linked List Node (named LLNode ) and a Binary Search Tree Node (named BSTNode ). The data included should be an int. B) Finish the following function that takes in an integer and pointer to the root node of a BST and adds a node to the BST whose data is the integer. The function should return a pointer to the root node. BSTNode *addToBST( BSTNode *root, int value) { C) Finish the following function to add to the back of a Linked List. The function should return a pointer to the head of the list (Remember that if the list is empty, head will be pointing to NULL ) LLNode *addToBackLL( LLNode *head, int value) {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
D) Write a function to find the minimum depth of a BST
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}