Union of two strings
807569Sep 11 2006 — edited Sep 11 2006hello ,
string 1="abcdefgh"
string 2 ="acdefl"
the Union ="abcdefghl"
I did wrote a program that make a union of two strings but it is really slow when i have a tables contains thousends of strings.
here part of my code
h=0;
for (int t = 0; t < vectorUnion.size(); t++) {
if (threeGramString.equalsIgnoreCase
(vectorUnion.elementAt(t) .toString()))
h = 1;
}
if (h == 0)
vectorUnion.addElement(threeGramString);
the problem this way is slow, is it any class does that in java or any other idea
thnak you in advance