Click here to see the full article post
Please have someone to check the grammar and make sure your staff can understand what the article says before you promote it as the solution.
@Nio I am writing the articles. What specifically is wrong with it? English is my native language.
Hi Thanks for the article. Is there any way find out the use of q,what is the reason behind
return best[N - 5*q] << 2 * q;```
Something is wrong here: for N=11 the answer as per solution above is 27. Assuming 2 keys are consumed with Ctrl-A and Ctrl-C.
How? M=5 K=4 gives 25
M=6 K=3 gives 24
M=7 K=2 gives 21
M=4 K=5 gives 24
Maybe I am missing something...
<Multiply (k+1 keypresses): Multiply M by k>
is wrong. In order to multiply current
M letters on the screen k times, you need k + 2 key presses: one key2, one key3, and k key4.
I didn't read the mathematical method part. But the dynamic programming method part needs way more explanations. I feel this part is a simplified version of the article on GeeksForGeeks without all critical points.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.