You are given an integer n, the number of nodes in a directed graph where the nodes are labeled from 0 to n - 1. Each edge is red or blue in this graph, and there could be self-edges and parallel ...
// if the cost of edges is always 1, a regular bfs will be faster than using a priorityQueue (since we avoid the sorting overhead) ...