2017年6月15日

摘要: Note: This is to count the level. At beginning, since there are so many zombies, we need to add all of them to the Queue to start with. It is differen 阅读全文
posted @ 2017-06-15 11:22 codingEskimo 阅读(117) 评论(0) 推荐(0) 编辑
摘要: This is Matrix Problem which can be converted to BSF: Loop through each node, if it is island, find the edge. Inside the mark them all as sea. So it w 阅读全文
posted @ 2017-06-15 07:46 codingEskimo 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Only Path :判断是否只存在一个拓扑排序的序列 只需要保证队列中一直最多只有1个元素即可 tricky part:1) org has all the nodes. That is why each time there should only be 1 element in the que 阅读全文
posted @ 2017-06-15 06:17 codingEskimo 阅读(197) 评论(0) 推荐(0) 编辑

导航