I discovered containsAll() (a List interface method) during some coding today, and it looks pretty slick. Does anyone know how much this costs in
containsAll()
List
consider
n.ContainsAll(m)
the best possible case scenario is O(m), and that's if n is a perfect hash set.
considering unsorted lists, i can come up with an O(n*log(n) + m*log(m)) algorithm