t*********y 发帖数: 151 | 1 given a text file and a list of string, find the max length of strings that
combined from the given list
of string in the text file. Each character in the given list of string can
be used only once.
ANS: A list contains all possible prefix strings up to x. |
S********s 发帖数: 29 | |
k******z 发帖数: 4 | |
h**********c 发帖数: 4120 | 4 It looks like it is asking a word without repeating characters.
Opinion,
If it is chinese/hindi text, could be quite troublesome. |
h***s 发帖数: 45 | 5 - The strings should be concatenated sequentially or mixing is allowed? -
- What does "up to x" mean?
"ANS: A list contains all possible prefix strings up to x. "
楼主能给个例子吗? |
t*********y 发帖数: 151 | 6 我的理解是给一个dictionary, 一个string,找出dict 里能全部用string里的letter
表示的所有最长的词
【在 h***s 的大作中提到】 : - The strings should be concatenated sequentially or mixing is allowed? - : - What does "up to x" mean? : "ANS: A list contains all possible prefix strings up to x. " : 楼主能给个例子吗?
|
i*****o 发帖数: 105 | 7 sounds like knapsack variants:
text file is the capacity of letters
each string in the given list consumes some letter
there is no limit on the number of single string
it should use letter set to account capacity and consumption in dp
struct letter_set {
int l[26]; /* count of distinct letters */
} text_file, strings[N];
max{X(text_file - strings[i]) + 1|i=0...N-1} |