PLEASE ANSWER ALL 3 QUESTIONS CORRECTLY 1) In a single function declaration, wha
ID: 3581217 • Letter: P
Question
PLEASE ANSWER ALL 3 QUESTIONS CORRECTLY
1) In a single function declaration, what is the maximum number of statements that may be recursive calls?
A) 1
B) 2
C) n (where n is the function argument)
D) There is no fixed maximum
2) Which graph traversal algorithm uses a queue to keep track of vertices which need to be processed?
A) Depth-first search.
B) Breadth-first search.
3) When an element is retrieved in a chained hash table:
A) an element is hashed to a position in the array, then a sequential search of the linked list at that position is performed.
B) each linked list in the table is searched, one by one, until the element is found
C) a sequential search is made from the hashed position through the array until the element is found
D) an element is hashed to a position in the array and if the element is not found in that location, the search returns NULL.
Explanation / Answer
1) In a single function declaration, what is the maximum number of statements that may be recursive calls?
sol: D) There is no fixed maximum
2) Which graph traversal algorithm uses a queue to keep track of vertices which need to be processed?
sol: B) Breadth-first search.
3) When an element is retrieved in a chained hash table:
sol:A) an element is hashed to a position in the array, then a sequential search of the linked list at that position is performed.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.