Solución
solution.tsTypeScript
public class Solution {
public boolean containsChar(String text, String character) {
// Escribe tu solución aquí
if (text == null || character == null || character.length() != 1) {
return false;
}
char target = character.charAt(0);
int start = 0;
int end = text.length() - 1;
while (start <= end) {
if (text.charAt(start) == target) {
return true;
}
if (text.charAt(end) == target) {
return true;
}
start++;
end--;
}
return false;
}
}0respuestas