If the breakpoint is s at b 'th  keystroke then the optimal string  would have length  (n-b-1)*screen[b-1];
let curr = ( N - b - 1 ) * findoptimal ( b ) ; if ( curr > max ) max = curr ; } return max ; }