Question d’entretien chez Apple

Design an algorithm to find the maximum sum of non-adjacent elements in an array.