From: Richard Zenn Date: 2008-09-04T16:24:45+09:00 Subject: String Combine problem 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[i].size > s[i+1].size combine them 2. s[i+1].size > s[i].size combine them 3. s[i].size + s[i+1].size The upper result is {"aaab"} {"bc"} {"bcd"} {"cd"} {"dee"} {"eef"} Thanks for any help Richard -- Posted via http://www.ruby-forum.com/.