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