3
int numBusesToDestination(vector<vector<int>> &routes, int source, int target) {4
if (source == target) return 0;6
vector<bool> vis(routes.size(), 0);7
vector<vector<int>> g(routes.size());8
vector<unordered_set<int>> rout(routes.size());10
// create graph between the buses - which buses are connected to single stop11
for (int i = 0; i < routes.size(); ++i) {12
for (auto r : routes[i]) {14
for (int j = 0; j < i; ++j) {15
if (rout[j].find(r) != rout[j].end()) {21
if (rout[i].find(source) != rout[i].end()) {27
// search path to target using bfs35
if (rout[node].find(target) != rout[node].end()) return level;36
for (auto i : g[node]) {37
if (vis[i] == false) {