标签:
BFS有固定的套路 类似下面这个形式
ArrayList<String> queue = new ArrayList<String>(); queue.add(root); while(!queue.isEmpty()) { String temp = queue.poll(); for(neigbor : temp) { queue.add(); } }
[leetcode Summary] BFS
原文地址:http://www.cnblogs.com/fengmangZoo/p/4197087.html