Kutas Szklanka, czyli barwna podróż przez odmęty życia (autorstwa ...

Temat: doubly linked lists or a stack????
...to traverse a binary tree, would a doubly linked list (with a pointer to the parent node) be easier to implement than using a stack to pop the pointers off? Or is there an easier way? The easiest way is to use recursion, but it squanders RAM since you need entire incarnation per depth. If you want a depth first enumeration, a stack would be the way to go. For a breadth first enumeration, I will leave it up to someone who has written one. For the JAVA GLOSSARY and the CMP Utilities: < oberon.ark.com/~roedy
Źródło: topranking.pl/1297/doubly,linked,lists,or,a,stack.php



  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • skrzydlatta.keep.pl