Domanda di colloquio di Amazon

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