Einzelnen Beitrag anzeigen

alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#5

Re: Create Binary Tree From Preorder input

  Alt 22. Apr 2006, 14:09
What do you mean by 'two lists, one pre- the other one postorder' ?
If Yo have the list in reversed order, simply reverse 'left' and 'right'.

BTW: If you must deal with binary trees, ever tried AVL-Trees or Red-Black-Trees? They are self-balancing.
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat