Jump to content

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

no edit summary
No edit summary
No edit summary
Line 13:
return false
 
</pre>
 
<pre>
#IntersectionSet Difference Not Empty
DNE(A,B):
if |A| > |B|
Line 29 ⟶ 28:
return false
</pre>
 
 
== Set Intersection Not Empty ==
<pre>
#Set Intersection Not Empty
INE(A,B):
C = |A| < |B| ? A : B
D = |A| < |B| ? B : A
for ( c in B )
if ( c in D )
return true
return false
</pre>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.