Total subtree with given SUM

Why we use queue in the Solution. Is this just to maintain order of insertion.?Is there other alternative of Queue?

@smundepi27 yes for order. alternative list and deque but queue is best

i m not able to pass 2 test case can you please check. Already shared ide code

@smundepi27 i think you sent the wrong link

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Since, we need to form a complete binary tree we need to fill it level by level.