Anonymous user
User:Realazthat/Notes/Algorithms/Set-intersection: Difference between revisions
User:Realazthat/Notes/Algorithms/Set-intersection (view source)
Revision as of 20:13, 21 January 2011
, 13 years ago→Set Intersection Not Empty
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
if ( c in D )
return true
|