Awesome q2a theme
0 votes
27 views

Consider the following graph:

The minimum size of queue required when performing BFS on above graph is ________.
(Take size of queue as by maximum number of elements at any time).

 

What will be the correct answer for the foolowing question?

in DS by (135 points) | 27 views
0
I think 4 should be the minimum (if you start from E, B, F, C or G).

You can do it with 3, if you start from A or D. But with a queue of size 4, it is guaranteed that you can perform BFS no matter which node you start from.
+2
Answer provided by made easy is 4. But I think it should be 5.

Queue content:

=> C

=> B | E | G | D

=> E | G | D | A | F.    here 5 nodes are present at the same time.
0
Ooh good observation !
0
yes ,even i got 5 as the answer.

Please log in or register to answer this question.

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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Feb 2020
  1. shashin

    363 Points

  2. Shaik Masthan

    79 Points

  3. SuvasishDutta

    39 Points

  4. srestha

    33 Points

  5. Mk Utkarsh

    32 Points

  6. neeraj_bhatt

    31 Points

  7. !KARAN

    30 Points

  8. Debapaul

    23 Points

  9. Pratyush Priyam Kuan

    18 Points

  10. kalra05

    18 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
3,316 questions
1,581 answers
10,277 comments
89,904 users