Scala Mutable SortedSet intersect() method
In Scala mutable collections, SortedSet The intersect() method is utilized to compute the intersection between two SortedSets. Method Definition: def intersect(that: SortedSet[A]): SortedSet[A] Return Type: It returns a SortedSet containing the elements present in both the SortedSets. Example #1: //