Alarm.com Interview Question

There was a dynamic programming hackerrank question.