I have a List of Lists in java (grails) and I am trying to find the elements that exist in each list within the list. Does anyone have a quick way to do this? Thank you!
Share
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.
If lists have unique elements you can do it like this (bu unique elements I understand that one element can be placed in few lists, but only once per list. Otherwise if first list contains [1,2,2,3] and other contain [x,2,y] as output you will see [2,2] not [2] )