Chevron interview question

They asked me create an algorithm to solve a specific problem.