hw8 - CS1372 Homework 8 Assigned Due Thurs Wed November 1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS1372 – Homework 8 Assigned: Thurs, October 26, 2006 Due: Wed, November 1, 11:59pm. For this assignment, we implement a Doubly-Linked List of integers. You will need to define the following structures using typedef : DListElement_t , must contain the necessary pointers to manage each integer element in the linked list, as well as an integer value that is the associated data. DlistBase_t must contain the necessary pointers to keep track of the beginning and end of the list. Next, you should implement three subroutines, as follows: AddIntSorted(DListBase_t* base, int i) ; - This subroutine adds the integer “i” to the linked list referred to by “base”. The integer “i” should be inserted in the list in sorted order. In other words, if the list already contains 1, 5, 7 and 9, a new value 8 should be inserted after the 7 and before the 9. If the value to be inserted is already in the list, the new value must also be inserted, and can be either before or after the existing duplicate value. PrintList(DlistBase_t* base)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/17/2008 for the course CS 1372 taught by Professor Smith during the Fall '07 term at Georgia Tech.

Ask a homework question - tutors are online