Amazon Interview Question

Find the greater sum tree Two sum different approaches