homework2-sol

homework2-sol - CS251 Homework 2 Due date: Wednesday April...

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

View Full Document Right Arrow Icon
CS251 Homework 2 Due date: Wednesday April 27, 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 (20 pts) 1. If you insert keys in increasing order into a red-black BST, the tree height is mono- tonically increasing. True. 2. A good hash function should be deterministic, i.e., equal keys produce the same hash value. True. 3. In the situation where all keys hash to the same index, using hashing with linear probing will result in O ( n ) search time for a random key. True. 4. Hashing is preferable to BSTs if you need support for ordered symbol table operations. False. 5. In an adjacency list representation of an undirected graph, v is in w ’s list if and only if w is in v ’s list. True. 6. Every directed, acyclic graph has a unique topological ordering. False. 7. Preorder traversal is used to topologically sort a directed acyclic graph. False. 8. MSD string sort is a good choice of sorting algorithm for random strings, since it examines Nlog R N characters on average (where R is the size of the alphabet). True.
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.

Page1 / 4

homework2-sol - CS251 Homework 2 Due date: Wednesday April...

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