This task was really hard for me, at first I try to do a simple reqursion but it is unsuitable for this task. I almoust brake my brain while solve this =) Thank you
1
3
7