Good afternoon, how could I do so that within a String array I can detect which letters are repeated within themselves?
For example, if I have the contained vector = ["hello", "piano", "triangle"]; can return an array result = ["o", "a"]; which are the 3 letters that are present in each String, I tried with for but it does not come out, some help please, thanks
This code I tried:
var datos= ["hola", "piano", "triangulo"];
var resultado[];
for(int i=0;i<datos.length;i++){
char A[] = datos[i];
var a=0;
while(a<datos.length){
char B[] = datos[i+1];
for(int j=0;j<A.length;j++){
if(A[j]==B[a]){
resultado.push(A[j]);
}
}
a++;
}
}