🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.pascal
Article #2

Re: Help with Pascal program

#2
From: Sean Colbath
Date: Thu, 14 Nov 1985 17:45
29 lines
1788 bytes
In article <2047@aecom.UUCP> rgross@aecom.UUCP (Ronald Gross) writes:
>I need help with the following tree program.  I don't want to write 
>any more tree programs.
>
>Given the preorder and inorder traversals of a binary tree, build the tree
>and print the postorder traversal of it.
>
>Read the input read into two lists.  The tree should be built using
>pointers.
>
>The algorithm goes like this.  Given LIST1 (preorder) and LIST2 (inorder).
>The first node of LIST1 is the root of the tree.  This node is in the
>middle of LIST2, and partitions it into left and right sublists.  LIST1 is
>then partitioned into sublists.  Apply this recursively.
>
>Please have the program echo the input, use lots of routines (makes for
>easier reading.
>
>Thanks alot.  Oh yeah, here's some test data.
>	Thanx alot folks.  Your help is appreciated.
>				Ronny

Why does this sound suspiciously like someone's Data Structures assignment?

-Sean Colbath

"Dave, why don't you take a stress pill and lie down for a while?"
UUCP:    {allegra,decvax,ihnp4}!seismo!rochester!ur-tut!scco
BITNET:  SCCO@UORVM
Technical Details
Message-ID: <224@ur-tut.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!ur-tut!scco
References: <206@ur-tut.UUCP> <2047@aecom.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ur-tut.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!ur-tut!scco
From: scco@ur-tut.UUCP (Sean Colbath)
Newsgroups: net.lang.pascal
Subject: Re: Help with Pascal program
Message-ID: <224@ur-tut.UUCP>
Date: Thu, 14-Nov-85 12:45:24 EST
Article-I.D.: ur-tut.224
Posted: Thu Nov 14 12:45:24 1985
Date-Received: Sat, 16-Nov-85 09:13:10 EST
References: <206@ur-tut.UUCP> <2047@aecom.UUCP>
Reply-To: scco@ur-tut.UUCP (Sean Colbath)
Distribution: net
Organization: Univ. of Rochester Computing Center
Lines: 29