[LC] Added solution to populating next right pointers in each node.