[leetcode Summary] BFS

BFS有固定的套路 类似下面这个形式

ArrayList<String> queue = new ArrayList<String>();
queue.add(root);

while(!queue.isEmpty())
{
        String temp = queue.poll();
        for(neigbor : temp)
        {
               queue.add();
        }
}
原文地址:https://www.cnblogs.com/fengmangZoo/p/4197087.html