IBM interview question

Find all peaks in an array