From: "Sebastjan H." Date: 2012-05-02T15:26:24+09:00 Subject: Re: array of strings - finding letter combinations Sebastjan H. wrote in post #1059172: The way I am doing this manually (yes, it is a tedious job:) is that I compare the letters used with the alphabet (which could be defined as another array). That gives me the result of taken and free letters. Then I start the reassignment process. regards, seba > Hi All, > > I am new to ruby and I want to learn by examples and here is one from my > everyday work. I have an array of strings where each string contains a > combination of an ampersand and a letter (&e). The trick is, this > combination may only appear once in the whole array, so none of the > other strings may contain the same combination. > > I need to solve this problem so that ruby would suggest a possible and > not yet taken combination where duplicates occur. In case where no more > possible combinations exist, an error would be raised. > > My question is: could someone give me some general pointers how would I > achieve this (just enough to get me going:) > > Thank you kindly. > > regards > seba -- Posted via http://www.ruby-forum.com/.