given a string, we have to split the string in all distinct two and three parts (permutation doesn't matter). for example for:
cat
answer is
ca t ct a c at c a t
for
aaa
answer is
aa a a a a
how to do that? can you please provide a code in the best possible time complexity?
https://stackoverflow.com/questions/67363357/splitting-the-string-in-group-of-two-or-three-words May 03, 2021 at 12:07PM
没有评论:
发表评论