A recursive function to print DFS starting from v . It returns true if degree of v after processing is less than k else false It also updates degree of adjacent if degree of v is less than k . And if degree of a processed adjacent becomes less than k , then it reduces of degree of v also ,
void Graph :: DFSUtil ( int v , vector < bool > & visited , vector < int > & vDegree , int k ) {