I have a list of strings say L and an array of words say A. I want to find a string from the list L that is a best match to a string created from the permutations of the words in the array.
The array of words has about 200 elements and each string in the List L is of the same length say at max of 150 characters.
Something similar to the word break problem on geeksforgeeks but I am looking for a best match rather than an exact match.
My approach till now:
Creating all the word permutations from the array and running the Levenshtein distance to get a good match doesn't seem like a time efficient approach. Considering that generating a list of 200! strings is impractical.
My question is if there is a more efficient or better performing algorithm to solve this problem than my approach above?