Notifications
Clear all

[Closed] Finding common item from many arrays

I have a bunch of text array.
I need to find all items which are in all arrays.

What would be the most efficient way?

3 Replies

makeuniquearray all array , then join them , sort it , if same element amount is array amount , then the element is the common , you can use array[i] == array[arraycount+i] to test
or use the shortest array , finditem with all array

if we’re are talking about arrays of strings possibly hash them first.

Thanks!