import { readFileSync } from 'fs'; import { join } from 'path'; const fileString = readFileSync(join(__dirname, "input"), 'utf-8'); for (var i = 0; i < fileString.length; i++) { const win = fileString.slice(i, i + 14); const swin = new Set(win); if (swin.size == 14) { console.log(i + 14); break; } }