Additional+Coding+Practice

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

Info iconThis preview shows pages 1–2. 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 DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/27/2011 for the course CS 1372 taught by Professor Smith during the Spring '07 term at Georgia Institute of Technology.

Page1 / 3

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online