Amazon interview question

Maximum sum subarray such that no elements are consecutive