## Exam Information

Login / Sign Up to View Document

## Sample Document Text

NAME___________________________________________________ Wentworth Institute of Technology
Division of Professional and Continuing Studies
COMP385 Section 71 - Data Structures II - Fall, 2005
P1 P2 Total
Midterm – Open Book
1.
Write a loop that iterates Backward over an LinkedList collection of Strings. Use the methods previous and hasPrevious() to construct the loop.
2.
Add the appropriate items to the below diagram to make it into a Doubly Linked List (ie add the missing fields and missing arrows and indicators of the front and rear of the list)
3.
Given the following recursive definition of a function: f(n) = 0 for n=0 f(n) = f(n/2) if n is even f(n) = 1+f(n-1) if n is odd What are the values of f(1)_______________________________ f(2)_______________________________ f(3)_______________________________ f(7) ______________________________ f(8)_______________________________
4. a.
What operation is EASY to do for an array-based list, but is hard to do with Linked? Why?
b.
What operation is EASY to...

## Related Documents

Doubly Linked List Quiz

Linked List Exam

Doubly Linked List Notes

Either...or Exam

Either...or Notes

Either...or Notes

Either...or Notes

Either...or Notes

Either...or Exam

Either...or Exam

Specialized Notes

Specialized Exam

Limitations Notes

Linked List Notes

Implementation Quiz

Linked List Notes

© Copyright 2019 , Koofers, Inc. All rights reserved.

The information provided on this site is protected by U.S. and International copyright law, and other applicable intellectual property laws, including laws covering data access and data compilations. This information is provided exclusively for the personal and academic use of students, instructors and other university personnel. Use of this information for any commercial purpose, or by any commercial entity, is expressly prohibited. This information may not, under any circumstances, be copied, modified, reused, or incorporated into any derivative works or compilations, without the prior written approval of Koofers, Inc.