Midterm 2 - Illinois Institute of Technology Department of...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Illinois Institute of Technology Department of Computer Science Midterm 2 CS 331— Data-Structures Spring 2007 April 9, 2007 15:15–16:30 This is a closed book and closed notes exam. You are not allowed to use calculators or computers during this exam. Do ALL problems in this booklet. Read each question very carefully. You may detach pages, but you must return all pages of this exam. Name Email ID @iit.edu Do not place your social security number anywhere on this exam. Problem Points Score 1 6 2 4 3 4 4 4 5 6 6 2 7 4 8 6 9 4 10 4 11 4 12 6 13 6 14 6 15 6 16 6 17 6 Total 84 Percent 100 CS 331 Midterm 2 Spring 2007 1 Doubly Linked Lists Question 1) (6 points) Making reasonable assumptions about the names and availability of member variables and constructors, write an insertBefore(Node n, E data) method that inserts a new data element before node n in a doubly-linked list. Question 2) (4 points) Give an operation that is O (1) for doubly linked lists, and is O ( n ) for singly linked lists....
View Full Document

This note was uploaded on 10/03/2008 for the course CS 331 taught by Professor Beckman during the Spring '08 term at Illinois Tech.

Page1 / 8

Midterm 2 - Illinois Institute of Technology Department of...

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

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