Solución
solution.tsTypeScript
export function isPowerOfTwo(n: number): boolean {
for(let i = 0; i < n; i++ ){
if(2**i === n ){
return true
}
}
return false;
}0respuestas
export function isPowerOfTwo(n: number): boolean {
for(let i = 0; i < n; i++ ){
if(2**i === n ){
return true
}
}
return false;
}Aún no hay respuestas
¡Sé el primero en responder!
Recuerda ser amable. Estás comentando la solución de otra persona. Comparte tu perspectiva de forma constructiva y respetuosa.