
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

The problems in this problem set cover lectures C5 and C6.
a. What are doubly linked lists? What is the record declaration for a node in a doubly linked list? (hint: see Feldman page 672, problem 8)
b. Write an algorithm to insert a node into a sorted doubly linked list. Use a diagram to show the sequence of operations that have to be performed to carry out the insertion step.
Hint: Extend the approach used in class/ notes for singly linked lists.
c. Implement your algorithm as an Ada95 program.
Assume: i. The data field consists of a single integer.
Turn in a hard copy of your algorithm and code listing, and an electronic copy of your code.