Amazon Interview Question

Maximum sum subarray such that no elements are consecutive