Koofers

Past Exam for COMP 385 - DATA STRUCTURES II at Wentworth Institute of Technology (WIT)

Exam Information

Material Type:Mid-Term
Professor:Staff
Class:COMP 385 - DATA STRUCTURES II
Subject:Computer Science
University:Wentworth Institute of Technology
Term:--
Keywords:
  • Either...or
  • Doubly Linked List
  • Functionality
  • The Message
  • Linked List
  • Professional
  • In Front Of
  • In Front (of)
  • Data Structures
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3

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
155, "/var/app/current/tmp/"