Pregunta de entrevista de Qualcomm

Given an image represented as an array of pixels, develop an algorithm that flips it 180 degrees.