Amazon interview question

They asked me to solve a basic coding problem involving arrays and explain the approach and time complexity.