Solución
solution.tsTypeScript
export function wordSearch(grid: string[][], word: string): boolean {
// Escribe tu solución aquí
const plain = grid.flat();
let currentIndex = 0;
let newWord = '';
for(let i = 0; i < word.length; i++){
const l = plain.slice(currentIndex).find(letter => letter === word[i]);
if(!!l){
newWord += word[i];
currentIndex = plain.slice(currentIndex).indexOf(word[i])+1;
}
}
return word === newWord;
}0respuestas