Can anyone explain the top-down approach of the CSES Array Description problem?

How i solve this problem through top-down approach??
How can I built the recursion tree ??

Problem link CSES - Array Description