human
How to check if two given sets are disjoint ? | Returns true if set1 [ ] and set2 [ ] are disjoint , else false.
Take every element of set1 [ ] and search it in set2.
If no element of set1 is present in set2.
Driver program"
Solution in Python:
assistant
#Here is code to how to check if two given sets are disjoint .
 def areDisjoint ( set1 , set2 , m , n ) :
	for i in range ( 0 , m ) :
		for j in range ( 0 , n ) :
			if ( set1 [ i ] == set2 [ j ] ) :
				return False
	return True
set1 = [ 12 , 34 , 11 , 9 , 3 ]
set2 = [ 7 , 2 , 1 , 5 ]
m = len ( set1 )
n = len ( set2 )
print ( " yes " ) if areDisjoint ( set1 , set2 , m , n ) else ( " ▁ No " )