i would like some help on how to retrieve array indexes. i have the following scenario:
List <string> alphabet = new ....;
alphabet.add("a ");
alphabet.add("b ");
alphabet.add("a ");
alphabet.add("c ");
alphabet.add("a ");
i have populated a new arraylist which only identifies distinct/unique alphabet items in the firt array e.g. it is able to list contents a, b and c only.
my challenge is how do i identify occurence index for the unique array list so that it displays and shows that
item "a" exists on index 0,2,4
item "b" exists on index 1
item "c" exists on index 3
thank you..
List <string> alphabet = new ....;
alphabet.add("a ");
alphabet.add("b ");
alphabet.add("a ");
alphabet.add("c ");
alphabet.add("a ");
i have populated a new arraylist which only identifies distinct/unique alphabet items in the firt array e.g. it is able to list contents a, b and c only.
my challenge is how do i identify occurence index for the unique array list so that it displays and shows that
item "a" exists on index 0,2,4
item "b" exists on index 1
item "c" exists on index 3
thank you..
Comment