Question d’entretien chez Salesforce

Given a situation, come up with a most efficient algorithm to find the solution