Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

tree of numbers -> keep track of the sum as you work your way down the branch. every visit to a node, check if that sum of the parent plus your current node is larger your your current max. if it is, replace your max, keep traversing your tree.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: