KS1(Guddu and his mother) : video editorial

Appreciate the effort man. Nice video and very helpful. Keep it up.

thanks man , i always try my best .

I solved that question during the contest and I feel there is no digit dp in it …

brother for your comment ā€œi feel there is no digit dp in itā€ i can say only one thing , just because you solved it one way doesn’t means it can’t be solved other ways.

1 Like

Most of the people, solved it without using digit-dp, you can check the submissions…so I guess, I am favouring the majority here…I agree there is digit-dp, but not necessarily as it will get hard for newcomers and intermediates un-necessarily…so I tried to explain you that…in the video…do mention…that some implementation also works for this problem :slight_smile:

if there are more than one ways to do it (which is the case most of the times) i always mention it in the video.
And i know this can be solved using other approaches as well (most probably using Combinatorics , but since i am not good at it i can not explain it through that).
BTW what was your approach?

1 Like

My approach is to traverse the string three times and add numbers like (10+100+etc…). No combinatorics as well ! :slight_smile:

2 Likes