Word Ladder leetcode

Problem Link


My code is not giving correct output plz tell my mistake so I can correct it
My code >> https://ide.codingblocks.com/s/594299

https://ide.codingblocks.com/s/594301 basically when u are popping out of queue u have to check the size of queue… it tells no of elements present at that level… then accordingly perform operation… just a few changes needs in ur code… once refer to my code… hope it will clear all ur doubts…

thanks man !! one thing more with map I was getting 444ms time but with set I got 80ms can u plz explain this a bit . Bcz set and map both takes just log n time but here it was different story

actually run time on leetcode it not fixed… if u run 2-3 times u would always get different run times…rest exactly i dont know why set took less time… u can google it…

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.