Connect nodes at same level in binary tree

link to question:

i’ve used BFS using queue to solve it.
i am not able to find where my code is wrong.Below is link to my code.You need to check only connect method in my code.
https://practice.geeksforgeeks.org/viewSol.php?subId=e72bc9c7e14cff430ca3787cf384fab7&pid=700184&user=mrakesh4444

Give the question link not solution link.

1 Like

i updated the blog.Please check