 An explicitly queue-based implementation (sometimes called "Forest Fire algorithm") is shown in pseudo-code below.It is similar to the simple recursive solution, except that instead of making recursive calls, it pushes the nodes onto a queue for consumption