Solución

@freddyperezdev·9/5/2026TypeScript
solution.tsTypeScript
public class Solution {
    public boolean startsWith(String text, String prefix) {
        // Escribe tu solución aquí
        if (prefix.length() > text.length()) return false;
        for (int i = 0; i < prefix.length(); i++) {
            if (text.charAt(i) != prefix.charAt(i)) return false;
        }
        return true;
    }
}
0respuestas
Respuestas

Aún no hay respuestas

¡Sé el primero en responder!

Escribir un comentario

Recuerda ser amable. Estás comentando la solución de otra persona. Comparte tu perspectiva de forma constructiva y respetuosa.

Debes iniciar sesión para publicar un comentario.