The disjoint? is an inbuilt method in Ruby that returns true if the set and the given set have no element in common.
Parameters: The function does not takes any parameter.
Return Value: It returns a new set built by duplicating the set, removing every element that appears in the given enumerable object.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.