FReviewQuestions - CS 284 Algorithms Some Sample Final Exam...

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

View Full Document Right Arrow Icon
CS 284 Algorithms Some Sample Final Exam Questions 1) During a breadth-first search, the status of a gray vertex is: a) It has been completely processed. b) It is in the FIFO queue. c) It is in the priority queue. d) It is undiscovered. 2) The number of edges in a complete undirected graph of n nodes is: (a) n-1 (b) n (c) n(n-1)/2 (d) n(n+1)/2 (e) n 2 3) If an undirected graph has at least as many edges as vertices (| E | | V |), then the graph: a) contains exactly one cycle b) contains at most one cycle c) contains at least one cycle. d) is acyclic (has no cycles). 4) How long does it take to determine if a given vertex has zero degree in an undirected graph G = ( V , E )? a) O ( V + E ) for adjacency matrix and O ( V ) for adjacency lists. b) O ( V ) for adjacency matrix and O (1) for adjacency lists. c) O ( E ) for both adjacency matrix and adjacency lists. d) O ( V ) for both adjacency matrix and adjacency lists. 5)
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 04/15/2011 for the course CS 284 taught by Professor Jamess. during the Spring '10 term at Jordan University of Science & Tech.

Page1 / 2

FReviewQuestions - CS 284 Algorithms Some Sample Final Exam...

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