Amazon interview question

Recursion (divide and conquer)