rustgym 0.2.0

rustgym solutions
Documentation
<div><p>In a network of nodes, each node <code>i</code> is directly connected to another node <code>j</code> if and only if&nbsp;<code>graph[i][j] = 1</code>.</p>

<p>Some nodes <code>initial</code> are initially infected by malware.&nbsp; Whenever two nodes are directly connected and at least one of those two nodes is infected by malware, both nodes will be infected by malware.&nbsp; This spread of malware will continue until no more nodes can be infected in this manner.</p>

<p>Suppose <code>M(initial)</code>&nbsp;is the final number of nodes infected with malware in the entire network, after the spread of malware stops.</p>

<p>We will&nbsp;remove one node from the initial list.&nbsp; Return the node that if removed, would minimize&nbsp;<code>M(initial)</code>.&nbsp; If multiple nodes could be removed to minimize <code>M(initial)</code>, return such a node with the smallest index.</p>

<p>Note that if a node was removed from the <code>initial</code>&nbsp;list of infected nodes, it may still be infected later as a result of the malware spread.</p>

<p>&nbsp;</p>

<ol>
</ol>

<p><strong>Example 1:</strong></p>

<pre><strong>Input: </strong>graph = [[1,1,0],[1,1,0],[0,0,1]], initial = [0,1]
<strong>Output: </strong>0
</pre>

<p><strong>Example 2:</strong></p>

<pre><strong>Input: </strong>graph = [[1,0,0],[0,1,0],[0,0,1]], initial = [0,2]
<strong>Output: </strong>0
</pre>

<p><strong>Example 3:</strong></p>

<pre><strong>Input: </strong>graph = [[1,1,1],[1,1,1],[1,1,1]], initial = [1,2]
<strong>Output: </strong>1
</pre>

<p>&nbsp;</p>

<p><strong>Note:</strong></p>

<ul>
	<li><code>1 &lt; graph.length = graph[0].length &lt;= 300</code></li>
	<li><code>0 &lt;= graph[i][j] == graph[j][i] &lt;= 1</code></li>
	<li><code>graph[i][i] == 1</code></li>
	<li><code>1 &lt;= initial.length &lt;= graph.length</code></li>
	<li><code>0 &lt;= initial[i] &lt; graph.length</code></li>
</ul>
</div>