2 ms·
> Check if a List Contains All Elements of Another List: > contains_all = all(elem in list1 for elem in list2) Isn't that quadratic? Can't it be implemented i
by gus_massa 3y ago
> Check if a List Contains All Elements of Another List:
> contains_all = all(elem in list1 for elem in list2)
Isn't that quadratic? Can't it be implemented in linear (or NlogN) time using sets?