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

 

Whats wrong with option B?

Give an example?

asked in Programming by Junior (597 points)   | 48 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)  

Related questions



Top Users Mar 2017
  1. rude

    5246 Points

  2. sh!va

    3054 Points

  3. Rahul Jain25

    2920 Points

  4. Kapil

    2732 Points

  5. Debashish Deka

    2602 Points

  6. 2018

    1574 Points

  7. Bikram

    1444 Points

  8. Vignesh Sekar

    1440 Points

  9. Akriti sood

    1424 Points

  10. Sanjay Sharma

    1128 Points

Monthly Topper: Rs. 500 gift card

21,556 questions
26,908 answers
61,270 comments
23,278 users