Utility bfs method to fill distance vector and returns most distant marked node from node u
int bfsWithDistance ( vector < int > g [ ] , bool mark [ ] , int u , vector < int > & dis ) { int lastMarked ; queue < int > q ;