I have a list of strings that contain some duplicates. They are not EXACT duplicates as some contain spaces in different locations. Example of a list:
best shoes for flat feet
bestshoes for flat feet
best shoesfor flatfeet
best shoes for flatfeet
Now what I would like to do is remove all these duplicate strings, keeping only the one with the MOST spaces (we will assume this is the correct spacing).
Can anyone recommend me a way to accomplish this?