Amazon interview question

two sum of a consecutive array