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 BEANSWERED ON THE PAPER. Instructions: Students MUST count the number of pages in this examination paper before begin- ning to write, and report anydiscrepancyimmediately to the invigilator. This exam has elevenpages (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 12 0 22 0 31 0 41 0 51 5 62 5 Total 100
Background image of page 1

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

View Full DocumentRight 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 thereisacorrect 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. False (c) [5] When designing a divide and conquer algorithm for items stored in a linked list of size n ,anapproach 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 size1and one of size n - 1. False (d) [5] The lower bound for sorting is ( n log n )soitisimpossible to find a sorting algorithm which is O ( n )inthe 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.

Page1 / 12


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