I've spent quite some time figuring out why is it that for problem (8A - Train and Peter), instead of "forward" at test 14, my output is "both", but to no avail. Since the entire string is hidden and I am shown just a part of it, it's quite hard to understand where the mistake could be. Here is my submission: 95835050. Thank you in advance. Edit: Some flaws fixed but no real result yet 95837954
Consider input:
you print
both
even though the answer isfantasy
.Thanks for the hint, i added the condition
(strstr(v,a1)!=rstrstr(v,a1) || strstr(v,a2)!=rstrstr(v,a2))
, still no progress on test 14 thoughCan you write down the condition for a pattern to be possible forward? (ignore backward for now)