DATA STRUCTURE
Programming and Technical
Programming
Technical
Which of the following data structure is best used for level by level order traversal in Binary tree?
[1] Queue
[2] Stack
[3] Array
[4] None of the above
Read Solution (Total 5)
-
- [1] Queue . As it take the top element and mark visited to it and then take its neighbour and mark visited to them.
- 8 years agoHelpfull: Yes(6) No(1)
- [1] Queue is used
- 6 years agoHelpfull: Yes(1) No(0)
- array is a one of the data structure used for level by level order traversal.
- 6 years agoHelpfull: Yes(1) No(0)
- (1) Queue is the option to perform level order traversal.
- 6 years agoHelpfull: Yes(1) No(0)
- queue as it take top element and mark visited
- 8 years agoHelpfull: Yes(0) No(0)
DATA STRUCTURE Other Question