Amazon Interview Question

The question was something like maximum sum without considering adjacents.