Walmart interview question

Tree subset sum calculation java