Intel Corporation interview question

Array -> simple graph question -> simple dp