I need to generate the letters in this way:
(and this goes all the way down to...)
So basically how I've done it so far is put all the letters from a-z into a set (the alphabet so to speak) and then I'm iterating over that alphabet, but I'm really stumped on the algorithm to generate the letters in this pattern. Another problem I had is if I do something like this for example:
Iterator it = alphabet.iterator(); Iterator it2 = it; it2.next();
If I do this it seems that my it2.next() will increment not only "it2", but "it" as well. I assume this is because with iterators if you use the assignment operator= it assigns the actual address to that iterator. Is there any way around this so I could assign iterator it2 with the position of iterator it, but be able to increment them seperately? I think if I could do that it would allow me to figure out this algorithm much easier.
Maybe I am taking a completely wrong approach to this, anyways I'm sure the geniuses here will have some good ideas :-). Any help greatly appreciated.
This post has been edited by Perogy: 13 November 2009 - 03:55 PM