I am currently trying to compare each element of one list with every element of another list. This has a time complexity of N*N which is a hindrance to the performance.