{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

midterm2 - Comp Sci 1MD3 Mid-Term II 2004 Dr Jacques...

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

View Full Document Right Arrow Icon
Comp Sci 1MD3 Mid-Term II 2004 Dr. Jacques Carette Name: Student No.: Duration : 50 minutes This midterm contains 18 questions on 4 pages This midterm will be marked out of 50. There are 60 total marks available. Answer the question in the space provided. Do not separate the pages. Make sure that you do not get stuck on one question; use your time wisely.
Background image of page 1

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

View Full Document Right Arrow Icon
1. All of the following questions are true/false and worth 1 point each. [3] (a) It is possible to have a C function return a function pointer as a return value. (b) XSL is a programming language. (c) It is possible to implement a linked-list of bounded length using an array. 2. Show how the array below would be arranged in main memory when stored in row major order. [3] 5 3 7 4 2 8 1 9 6 3. Which of the following datastructures has the drawback of “creeping forward” in memory during normal use ? [1] (a) an array (b) a queue (c) a circular stack (d) a doubly linked list 4. Which of the following methods to resolve collisions in a hash table result in primary clustering? [2] (a) double hashing (b) extend buckets with a linked list (c) put the elements in the next available slot (d) put the elements in the next available slot, looking at slots (
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}