Amazon interview question

Find the greater sum tree Two sum different approaches