给你一个字符串 s 和一个字符串列表 wordDict 作为字典。请你判断是否可以利用字典中出现的单词拼接出 s 。
注意:不要求字典中出现的单词全部都使用,并且字典中的单词可以重复使用。
示例 1:
输入: s "leetcode", wordDict […
(not an original, only classified as one to avoid cramming reference links)
paper: https://owainevans.github.io/reversal_curse.pdf
blog with interactions with the authors: Paper: LLMs trained on “A is B” fail to learn “B is A” — LessWrong
This is a…