Using a stack as a Queue in Java -


I need to process a tree in different orders, assuming that both BFS and DFS both have a queue or a Using stack is easy, however, there is a proper Java interface available to me to do something

  queueOrStack & lt; N & gt; Pending = ... while (! Pending! ISet ()) {N node = pending.poll (); // & lt; ----- This problem is pending. All (node ​​children ()); Process (node); }   

There is no real problem, I have implemented ArrayList in implementing some line 1 Can I do though, am I sure I'm seeing something in the Java Store Framework or is it really missing? Use the latest-first comparator with

<__>

or priority question , which may be a dumb idea.

Such structure is there.

It will be ArrayDek ->

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -