I have tried to make video solutions for the problems I have solved in October Long Challenge 2019, hoping to help people understand the problem and what was my approach for the same.
I created a playlist for the same: Codechef October Long Challenge 2019: Video Solution Playlist
Please do like the video and do subscribe for more such content.
If you are not familiar with recursion, looking directly to it’s solution won’t help much for this question. This is a problem which requires quite decent understanding of recursion.First try your hands on recursion and then this problem will be a cakewalk for you.