I discovered containsAll() (a List interface method) during some coding today, and it looks pretty slick. Does anyone know how much this costs in terms of performance/iterations?
The documentation didn’t offer much in terms of that.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
.equals(..)(Note: this is about lists, as you specified in the question. Other collections behave differently)So it’s O(n*m), where n and m are the sizes of both collections.