The simple way to implement breadth first search is using a "queue". So my answer is "queue" . When ever you are using Breadth first search ( BFS ) then use of "queue" data structure is good.
If you have any other answers apart for this then you can comment but must specify the justification of you answer.
If you have any other answers apart for this then you can comment but must specify the justification of you answer.
No comments:
Post a Comment