distinct subsequence
populating next right pointers
populating next right pointers