我刚刚在网上遇到了这个有趣的问题,对于如何在这方面取得进展感到非常难过.
Write a function that finds all the different ways you can split up a word into a
concatenation of two other words.
Run Code Online (Sandbox Code Playgroud)
这是后缀树用于什么的东西吗?
我不是在寻找代码,只是寻找前进的概念方法.
一些伪代码:
foreach place you can split the word:
split the word.
check if both sides are valid words.
Run Code Online (Sandbox Code Playgroud)