Trouble printing a BST line by line 
Author Message
 Trouble printing a BST line by line

Hi there,

been stuck on this problem for a couple of weeks and do not know how
to solve it any help greatly appreciated

do not know how to properly indent the tree line by line
procedure LevelOrderQueue(T: SearchTree);

 Q: PQueue;
 Z: TreePtr;


  if (T <> Nil) then
      Z := T;
      PutInQueue(Z, Q);
     writeln(Z^.aWord:40); { put root in middle of page}

      while not(QEmpty(Q)) do
         Z := DeQueue(Q);
         {if Z^.level = m then      ... not sure how to indent each
         if Z^.Left <> nil then
         if Z^.Right <> nil then


any help greatly appreciated

i put a level element in the tree data structure but not really sure
how to use it

Barry Hynes
Summerside, PE

Fri, 25 Nov 2005 20:36:36 GMT  
 Trouble printing a BST line by line

>do not know how to properly indent the tree line by line

What do you want to do?

Do you want to show multiple nodes in a line, or one node per line with an
indentation reflecting the level?


Sun, 27 Nov 2005 09:30:05 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Read file line per line

2. Newbie question about moving thru table line by line

3. Can I turn 26 line mode to 50 line mode

4. Blank line between lines: HELP!

5. Same line screen printing...

6. Printing lines of memo fields

7. I like to print color Line graphics, text color in a hp deskject

8. QuickReport - Printing selected lines of memo fields

9. Print Screen 25/50 Lines

10. HELP: Print Screen 25/50 Lines

11. How to read two lines of input in Pascal but treat it as one line?

12. How can detect printer is on-line or Off-line!


Powered by phpBB® Forum Software