PLEASE ANSWER ALL 3 QUESTIONS CORRECTLY 1) A(n) _____________ is a node in a gra
ID: 3581224 • Letter: P
Question
PLEASE ANSWER ALL 3 QUESTIONS CORRECTLY
1) A(n) _____________ is a node in a graph.
A) vertex
B) edge
C) vertical
D) pointer
2) Which of the following problems would be best solved with a breadth-first search?
A) You need to discover if there is a cycle in a graph.
B) You need to find the closest node to node x that stores a value greater than 10.
C) You need to find a valid path from one node to the next through a maze graph.
3) Which of the following is the least efficient way to sort a million 32 bit integers?
A) Merge sort
B) Bubble sort
C) Quick sort
Explanation / Answer
1) A(n) _____________ is a node in a graph.
A) vertex
2) Which of the following problems would be best solved with a breadth-first search?
B) You need to find the closest node to node x that stores a value greater than 10.
(Hint : using BFS all adjacent node you can get and from that you can find node that stores a value greater than 10)
3) Which of the following is the least efficient way to sort a million 32 bit integers?
C) Quick sort
(Hint : From big O notation we can see that quick sort take more time than merge and bubble sort so it is least efficient.)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.