What the Interviewer is Looking for:
Big Picture Understanding
Knowing How the Pieces Fit Together
Organization
Parcticality
Testing a Function:
Define the test case
normal case
Extremes: empty array? very small? very large?
Nulls and "illegal" input
Strange input