Amazon interview question

Divide and conquer algorithms, start with simple solution then optimize