Hello people, I'm a new member of this fantastic community!
I'm a student and i have to solve this puzzle:
I have a string like
"The quick brown fox jumps over the lazy dog" (or longer)
I have to search through this string using boolean operators like
"quick AND brown OR fox"
mantaining the logical order, so "quick AND (brown OR fox)".
(consider that the search string can be longer with n search options).
What's the strategy?
I can recursively tokenize the string by splitting via strtok()? but how to mantain operator precedence?
If anyone can help me or if you know a good solution pointing me to the right way i'll appreciate!
Thanks!
Valerio
I'm a student and i have to solve this puzzle:
I have a string like
"The quick brown fox jumps over the lazy dog" (or longer)
I have to search through this string using boolean operators like
"quick AND brown OR fox"
mantaining the logical order, so "quick AND (brown OR fox)".
(consider that the search string can be longer with n search options).
What's the strategy?
I can recursively tokenize the string by splitting via strtok()? but how to mantain operator precedence?
If anyone can help me or if you know a good solution pointing me to the right way i'll appreciate!
Thanks!
Valerio
Comment