Comments

okay, got it :) Thanks

Then why can't we add 1.3 after 2 if 1.3 is lexicographically greater?

Thank a lot!

Is this a valid list?

1

1.1

1.2

2

1.3

just want to confirm that can we add 1.3 (a deeper level to 1) after 2? And also is 2 lexicographically greater than 1.3? I know it's a basic level doubt but I am a bit confused, please help. Thanks.

Thanks, It helped.

Can someone please explain me the solution for E (editorial one), I have been trying for a long time but unable to understand how this condition came :

(s — sum <= r — l + 1).

ok thanks

n can be written as : n = q*11 + (n%11), let (n%11) = x.

I am not getting this line:
So we must use at least n%11 times a 111 to build n.

Can you please explain how your solution works?

I mean the idea behind this solution. Thanks.

Yes it helped. Thanks

I didn't get the thing. What exactly dp[i][j] is representing? Can someone help? Thanks!

Why we are updating the res first then ct? Can someone explain the significance of the order?