You are viewing a single comment's thread. Return to all comments →
I can't quite figure out the formula in the 2nd pass
ans += (i[1] * (i[1] + 1)) // 2
How is this derived? Emprically I understand that it is correct. But I can't quite understand why.
Seems like cookies are disabled on this browser, please enable them to open this website
Special String Again
You are viewing a single comment's thread. Return to all comments →
I can't quite figure out the formula in the 2nd pass
How is this derived? Emprically I understand that it is correct. But I can't quite understand why.