You are viewing a single comment's thread. Return to all comments →
Priority Queue adds new nodes in a way dependent on the Comaparator. What we need is a simple FIFO queue and LinkedList serves the purpose.
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Level Order Traversal
You are viewing a single comment's thread. Return to all comments →
Priority Queue adds new nodes in a way dependent on the Comaparator. What we need is a simple FIFO queue and LinkedList serves the purpose.