R
Richard Zenn
Hello,
I have a algorithm problem and I'm trying to resolve it
Here is an array s = ["aaa", "b", "c", "d", "ee", "f"]
I want to combine them with some rules
1.
s.size > s[i+1].size
combine them
2.
s[i+1].size > s.size
combine them
3.
s.size + s[i+1].size
The upper result is
{"aaab"}
{"bc"}
{"bcd"}
{"cd"}
{"dee"}
{"eef"}
Thanks for any help
Richard
I have a algorithm problem and I'm trying to resolve it
Here is an array s = ["aaa", "b", "c", "d", "ee", "f"]
I want to combine them with some rules
1.
s.size > s[i+1].size
combine them
2.
s[i+1].size > s.size
combine them
3.
s.size + s[i+1].size
The upper result is
{"aaab"}
{"bc"}
{"bcd"}
{"cd"}
{"dee"}
{"eef"}
Thanks for any help
Richard