Unfortunately l am not give a choice as the data structure that l am able to
work with. Therefore any help would be greatly appreciated
Thanks................

Kind Regards
        Renato Parletta........

To reply send mail to:   [EMAIL PROTECTED]
                    ICQ No:   13078952

         "l can only assume that a "Do Not File" document
          is filed in a "Do Not File" file."

Senator Frank Church
Senate Intelligence Subcommittee Hearing, 1975




-----Original Message-----
From: Glynn Clements <[EMAIL PROTECTED]>
To: Renato <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Saturday, 14 November 1998 20:09
Subject: Re: Ordered linked list of blocks


>
>Renato wrote:
>
>> l am wanting to implement an ordered linked list of blocks
>> the declaration that l am using is
>
>> #define BLOCKSIZE 100
>> typdef struct listNode *listNodePtr;
>>
>> typdef struct data{
>>     char *key;
>>     chat *value;
>>  }Data;
>>
>> typdef stuct listNode{
>>     Data ListNodeData[BLOCKSIZE];
>>     listNodePtr next;
>> }ListNode;
>>
>> typdef struct list{
>>     listNodePtr head;
>>     unsigned listSize;
>>     unsigned extract;
>> }List;
>>
>> l use the extract field to keep the index value last array position in
the
>> current node.
>> My question is could l please recieve some help implementing the entry of
>> data into this struture for both key and value in an ordered format.
>
>Linked lists aren't a particularly suitable structure for sorted data,
>as the insertion time is proportional to the number of entries.
>
>Better solutions would be binary or n-ary trees, or a two-level array
>(an array of pointers to blocks). All of these have logarithmic time
>complexity. The algorithms should be available in any text book.
>
>--
>Glynn Clements <[EMAIL PROTECTED]>
>

Reply via email to