Salesforce Interview Question

First question was something like 2 sum Second question was based on DFS