The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+16 votes
966 views

The most appropriate matching for the following pairs

    X: depth first search         1: heap 
    Y: breadth-first search       2: queue 
    Z: sorting                    3: stack

is:

  1. X - 1  Y - 2  Z - 3
  2. X - 3  Y - 1  Z - 2
  3. X - 3  Y - 2  Z - 1
  4. X - 2  Y - 3  Z - 1
asked in Algorithms by Veteran (59.4k points)
retagged by | 966 views

3 Answers

+16 votes
Best answer

Answer is $C$.

X - 3 DFS uses stack implicitly
Y - 2 BFS uses queue explicitly in Algo
Z - 1 Heap-Heapsort
 

answered by Boss (42.5k points)
edited by
+1
What do you mean by the words "EXPLICIT" and "IMPLICIT" here?
+6 votes
Answer: C
answered by Boss (34.1k points)
+1 vote
Ans: C
answered by Loyal (7.1k points)
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

36,171 questions
43,624 answers
124,024 comments
42,893 users