{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


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

View Full Document Right Arrow Icon
Name: __________________________________ ID Number: ______________________________ UNIVERSITY OF VICTORIA EXAMINATIONS- DECEMBER 2009 CSC 225 - Algorithms and Data Structures: I Section A01 (CRN 10839) Instructor: Wendy Myrvold Duration: 3 hours TO BE ANSWERED ON THE PAPER. Instructions: Students MUST count the number of pages in this examination paper before begin- ning to write, and report any discrepancy immediately to the invigilator. This exam has eleven pages (the last page is blank in case you need extra space) plus the header page. Use only space provided on exam for answering questions. Closed book. No aids permitted. Question Value Mark 1 20 2 20 3 10 4 10 5 15 6 25 Total 100
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
CSC 225- Page 1 of 11 1. Circle true or false for each question and justify your answer. No marks will be given unless there is a correct justification. (a) [5] Suppose singly linked lists are used to implement a queue. Then, adding to the queue should be done at the front of the list, and deletions from the queue should be taken from the end of the list. True False (b) [5] It is possible to sort an array of n numbers in O ( n log n ) time in the worst case using only O (1 ) extra space. True False (c) [5] When designing a divide and conquer algorithm for items stored in a linked list of size n , an approach which divides the problem in half will always be faster asymptotically in the worst case than one which divides the list into one subproblem of size1 and one of size n - 1. True False (d) [5] The lower bound for sorting is ( n log n ) so it is impossible to find a sorting algorithm which is O ( n ) in the worst case.
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 ]}