HW1 (2) - Sameer Abdul CS 251 Homework 1 True/False...

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

View Full Document Right Arrow Icon
Sameer Abdul Page 1 of 4 CS 251 Homework 1 True/False Questions 1. In a dynamically-resized array implementation of a stack, any sequence of m push and pop operations takes time proportional to mn. - False 2. Amortized analysis is used to determine the worst case running time of an algorithm. - False 3. In order to support the use of foreach statements, a data structure must implement the Comparable interface. - False 4. An n log n algorithm is not necessarily slower than a 6n algorithm for some input. - True 5. An algorithm that uses 12n 2 + 4n log n operations is an O(n 3 ) algorithm. - False 6. An array is partially sorted if the number of inversions is linearithmic. - False 7. Sorting small arrays with Mergesort is inefficient. - True 8. Mergesort is stable. - True 9. Some inputs cause the System Quicksort to use a quadratic number of compares. - False 10. Regardless of the input, random shuffle makes it statistically impossible for Quicksort to have quadratic complexity. - True 11. Sequential search Symbol Tables have a constant time insertion complexity. - False
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/29/2011 for the course CS 251 taught by Professor Staff during the Spring '08 term at Purdue University-West Lafayette.

Page1 / 4

HW1 (2) - Sameer Abdul CS 251 Homework 1 True/False...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online