摘要:
Stop as Node 抽象为图的问题,将每个stop作为一个节点。公交车路线上的所有stop都是互相连通的,以此构建邻接链表,然后BFS。 这种方法超时了,原因是我们构建图的时候,时间复杂度太高了。而且图里的节点数为所有stop的个数,导致BFS的时候也要花较多的时间。 Route as Nod 阅读全文
摘要:
3 invalid situations case1: 2 parents no circle case2: 2 parents with circle case3: 1 parent with circle 2 main steps 1 check whether there exists a n 阅读全文