hrnax.blogg.se

Contoh program binary search tree pascal
Contoh program binary search tree pascal





contoh program binary search tree pascal contoh program binary search tree pascal

The line numbers should appear in ascending order and, if a word appears on a line of the text more than once, then the line number should appear only once for that word in the cross-reference contains two units, one the holds the inforamtion form the text file in a link lists and the orders it, then passes to the bianry tree, to store it,from there it is displyed onto the screen.i have made the three units alrady but having huge difficulties with the coding of the tree and the passing of data. It should display each line of the text preceded by its line number (starting from 1) and then display a list, in alphabetic order, of each word in the text and the line numbers of the lines on which it appears. Here is the briefYou are required to construct a program that will generate a cross-reference listing of a text provided in a file. Are you using Delphi or Pascal? (It makes a difference.)All binary trees are just a fancy form of linked-list, so there is no reason why you can't include a string in your node record.In Delphi: typepNode = ^tNode tNode = recordword: string left, right: pNodeend In Pascal, I'd use a Schema type: typepNode = ^tNode tNode( wordsize: integer ) = recordword: string( wordsize ) left, right: pNodeend If you can't use Schemata, then just make a simple character array: typepNode = ^tNode tNode = recordword: array 1.80 of char left, right: pNodeend Hope this helps.







Contoh program binary search tree pascal