GATE CSE
First time here? Checkout the FAQ!
x
0 votes
53 views

 

Whats wrong with option B?

Give an example?

asked in Programming by Junior (621 points)   | 53 views

1 Answer

0 votes

Option B won't be correct  as it will print all the nodes in kth level. 

It's a kind of Depth First traversal . Has it been a Breadth First type, your conjecture may be teated correct. 

 

So, I think option A  is correct.

answered by (305 points)  


Top Users May 2017
  1. akash.dinkar12

    3292 Points

  2. pawan kumarln

    1652 Points

  3. sh!va

    1650 Points

  4. Arjun

    1424 Points

  5. Bikram

    1372 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1142 Points

  8. Angkit

    1044 Points

  9. LeenSharma

    904 Points

  10. srestha

    718 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    458 Points

  2. Arnab Bhadra

    402 Points

  3. pawan kumarln

    278 Points

  4. Ahwan

    236 Points

  5. bharti

    194 Points


22,786 questions
29,121 answers
65,184 comments
27,661 users