Quiz for COMP 380 - DATA STRUCTURES I at Wentworth Institute of Technology (WIT)

Quiz Information

Material Type:Quiz 2
Subject:Computer Science
University:Wentworth Institute of Technology
  • Doubly Linked List
  • Either...or
  • Linked List
  • The Message
  • Professional
  • In Front Of
  • In Front (of)
  • Data Structures
Login / Sign Up to View Document
Preview Page 1Preview Page 2

Sample Document Text

NAME________________________________________________ DATE____________ Wentworth Institute of Technology Division of Professional and Continuing Studies COMP380 Section 71 – Data Structures I - Spring, 2006 Quiz Number 2 – OPEN BOOK 1. 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 and label the fields) 2. Given the below recursive method, what is the value of int ffudge( int n) { if (n == 0) return 1; if (n==1 ) return 2; return 3*ffudge(n-2) + 2*ffudge(n-1); } a. ffudge(3) b. ffudge(6) 3. 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 do for Linked lists, but is Hard to do with array-based lists? Why? 4. a. How can you avoid popping from an empty stack? b. What message do you get if you do attempt to pop from an empty stack? 5. What does this statement do in the context of opera...

Related Documents

Either...or Exam
Linked List Exam
Doubly Linked List Notes
Either...or Exam
Either...or Notes
Linked List Notes
Implementation Quiz
Linked List Notes
Linked List Notes
Either...or Exam
Either...or Exam
Following Operations Exam
Linked List Notes
155, "/var/app/current/tmp/"