added a solution to both of the populating next right pointers problems