If anyone could help me with this problem
https://www.hackerearth.com/practice/algorithms/dynamic-programming/2-dimensional/practice-problems/algorithm/real-estate-1-059f5228/
I am having difficulty in understanding how to approch this problem, I have encountered same type of question in varoius placement exams too.please help