User:Realazthat/Notes/Algorithms/Set-intersection: Difference between revisions

m
No edit summary
 
(One intermediate revision by the same user not shown)
Line 15:
</pre>
 
Complexity: O(1) if |A| > |B|, O(|B|) otherwise.
<pre>
#Set Difference Not Empty
Line 40 ⟶ 41:
D = |A| < |B| ? B : A
for ( c in BC )
if ( c in D )
return true