We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
omg i was getting frustrated with this one. Its weird it works if I instantiate the queue as a linked list, but it doesnt work with PriorityQueue. Shouldnt PriorityQueue work also? I almost had the same solution as vimal_Parthan but I had it initialized Queue queue = PriorityQueue() but this didnt work
Tree: Level Order Traversal
You are viewing a single comment's thread. Return to all comments →
omg i was getting frustrated with this one. Its weird it works if I instantiate the queue as a linked list, but it doesnt work with PriorityQueue. Shouldnt PriorityQueue work also? I almost had the same solution as vimal_Parthan but I had it initialized Queue queue = PriorityQueue() but this didnt work