演艺圈和老同志真是提高国民素质道路上的两座大山# Joke - 肚皮舞运动
f*d
1 楼
继续问题,跪求大牛帮忙扫:)
Given a dictionary and a string, write a program to output the valid words
while minimizing the numbers of skipped characters. The substring that
consists of a valid word in the dictionary may swap the characters. For
example, Given a dictionary d = window, cat and a string “iwndowdcta”, the
output is “window cat”. In this case, there is only one number of skipped
character which is ’d’.
多维背包?但是这个维度(#of alphas in language)还是太高了吧。有其它好的解法吗?
Given a dictionary and a string, write a program to output the valid words
while minimizing the numbers of skipped characters. The substring that
consists of a valid word in the dictionary may swap the characters. For
example, Given a dictionary d = window, cat and a string “iwndowdcta”, the
output is “window cat”. In this case, there is only one number of skipped
character which is ’d’.
多维背包?但是这个维度(#of alphas in language)还是太高了吧。有其它好的解法吗?