Amazon Interview Question

Given a technical question(using algorithms to solve), how would you solve it?