Midterm2 - 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

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 DocumentRight 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 ( h ( k ) + i 2 ) mod m 5. Given a hash table of size
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.

This note was uploaded on 03/26/2011 for the course CS 1md3 taught by Professor Skip during the Spring '11 term at McMaster University.

Page1 / 8

Midterm2 - 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

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