Write a program that, given a string of capital letters, output all possible phrases that could have been written originally, using any variant of the Oxford English Dictionary.
There are two inputs:
- A string \$s\$ of A-Z capital letters that is a phrase with certain letters removed. Example:
- Another string \$r\$ of the letters that have been removed from said phrase. Example:
IX. These letters are in no particular order.
Output all phrases shorter than twice the length of \$s\$ which, after removing letters in \$r\$, result in \$s\$. Separate words in each phrase by spaces.
- You are allowed to access any webpage you want, as long as it was created before this question was originally asked. If this webpage was changed in order to facilitate this challenge, then this is likewise not acceptable.
- Slang or names of places or people are not required.
- Disregard whether a phrase would be syntactically or grammatically correct.
- Assume that any full word containing only omitted letters is not to be included.
"MITURE","X" should only have one possibility.
"MN", "DAI" should give you "MAN", but need not give "ADMIN", "MIND", or "DAMN" because they're at least twice as long as "MN".