s
순회function maxScore(s: string): number {
let maxScore = 0
for(let i = 0; i < s.length - 1; i++) {
const curLeft = s.slice(0, i + 1)
const curRight = s.slice(i + 1)
const leftScore = curLeft.match(/[0]/gi)?.length ?? 0
const rightScore = curRight.match(/[1]/gi)?.length ?? 0
maxScore = Math.max(maxScore, leftScore + rightScore)
}
return maxScore
};