Salesforce Interview Question

array and tree and dp problems