You are viewing a single comment's thread. Return to all comments →
queue.poll() returns an object. you have to do
Queue<Node> queue = new LinkedList();
or do this :
Node tempNode = (Node)queue.poll();
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 →
queue.poll() returns an object. you have to do
or do this :