I have a large list (~200,000 elements) and another list of size 1-9. I need to find the longest arrangement of the small list in the large list. So I need to find whether the small list is a subset of the large list, with no repetitions (i.e. is [a,a] a subset of [a,b,c] should return False). Is there a way to do this?
I have tried .issubset but this returns true for duplicates. I have also tried checking through each permutation of the small list but this is too slow.