This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS251 Homework 1 Due date: Monday April 7, 11:59pm in Blackboard, submit PDF files only. This is a firm deadline : no extensions or late submissions will be accepted, since solutions will be released immediately after the deadline. True/False Questions 1. In a dynamicallyresized array implementation of a stack, any sequence of m push and pop operations takes time proportional to mn . 2. Amortized analysis is used to determine the worst case running time of an algorithm. 3. In order to support the use of foreach statements, a data structure must implement the Comparable interface. 4. An ∼ nlogn algorithm is not necessarily slower than a ∼ 6 n algorithm for some input. 5. An algorithm that uses 12 n 2 + 4 n log n operations is an O( n 3 ) algorithm. 6. An array is partially sorted if the number of inversions is linearithmic. 7. Sorting small arrays with Mergesort is inefficient. 8. Mergesort is stable....
View
Full
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.
 Spring '08
 Staff
 Data Structures

Click to edit the document details