solution to Populating Next Right Pointers in Each Node II