Rod cutting problem

can you tell me the approch for this problem i am confused how to do
Question link: https://practice.geeksforgeeks.org/problems/cutted-segments/0

@sunny.kumar2016 hey sunny there is video by deepak bhaiya in our course with the same name Rod cutting 1 d Dynamic programming if you will not understand by bhaiya video tell me I will tell you the approach
best of luck