CSC190H1 Midterm: csc190s_2002_mids

32 views4 pages
31 Jan 2019
School
Course
Professor

Document Summary

This exam is open textbook(s) and open notes. Use of computing and/or communicating devices is not permitted. Do not remove any sheets from this test book. The value of each part of each question is indicated. The total value of all questions is 90. Write your name and student number in the space below. Do the same on the top of each sheet of this exam book. To improve clarity, you may also wish to develop your code on the side before writing your final answer in the space provided. Answer the following questions by providing a very brief and direct answer. (1 mark). True or false: the number of edges in a non-empty binary tree is always one less than the number of nodes in the tree. Quicksort runs most efficiently when array is split into 2 equal halves. Insert the data {7, 4, -1, 0, 3, 8} into the array below to obtain the worst-case scenario for quicksort.