class Solution { public: int shortestPathLength(vector>& graph) { int n = graph.size(); if( n == 1) return 0; queue > q ; // node and bit state int finalstate = (1 << n )-1; vector > visited(n,vector (finalstate+1,0)); for(int i =0 ;i