First version of the Path sum problem.
First version of the Populating next right pointers in each node problem