Traverse adjacency list of v and print only those adjacent which have vDegree >= k after BFS .
for ( int i : adj [ v ] ) if ( vDegree [ i ] >= k ) System . out . printf ( " ▁ - > ▁ % d " , i ) ; } } } }