Return the number of count of non - accessible cells .
def countNonAccessible ( graph , N ) : NEW_LINE INDENT visited = [ False ] * ( N * N + N ) NEW_LINE ans = 0 NEW_LINE for i in range ( 1 , N * N + 1 ) : NEW_LINE INDENT if ( not visited [ i ] ) : NEW_LINE INDENT visited [ i ] = True NEW_LINE DEDENT DEDENT DEDENT