How to write the function of PrintNextRIght

I am facing some sort of confusion while writing the function for how to print the output after connecting nextRightNodes in tree(IN C++), please if you could help me?

Hey @saksham_thukral
Please share your code :slight_smile: