LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,856
Default List of data?

Hi Robert,

when I taught data structures in the 1980's I used BBC Basic to
demonstrate how a linked list structure could be implemented. A 1-D
string array was used to hold the data and a numeric array held the
pointers. In addition, a free-space pointer pointed to the next
available element of the array. As data was added (in any order) the
pointers were adjusted to maintain the correct sequence. If data is
deleted then the free space pointer is adjusted, along with the
pointer of the element which is removed and the pointer which pointed
to that element. It can also be beneficial to have another set of
pointers which point back to the previous data item, so that the list
can be searched in both directions.

I haven't tried to implement this using VBA, but similar approaches
could be taken.

Hope this helps.

Pete

On Dec 26, 8:38*pm, "Robert Crandal" wrote:
I know I didnt answer the question about a "linked list". *I
thought it would be better if I just forget about linked lists
because it is an abstract data type that is often implemented
in the C/C++ programming language.

Basically, a "linked list" is a set of data structures or "nodes"
that is in sequence; ie, the list has a beginning (i.e "head") and
and an end (i.e "tail"). *Each node contains data, in addition
to a "next" pointer which points to the next node in the list.

Below is a text/graphical depiction of a linked list with
6 nodes. *H is the head node, T is the tail node, and all
the other nodes are marked as N. *Each node has an
arrow or pointer which points to the next node.

* [H]--[N]--[N]--[N]--[N]--[T]

The nice thing about linked lists is that you can make them
dynamically grow or shink, by adding or deleting nodes.
So, a linked list is ALMOST like an array. *The main difference
is that an array size is usually fixed, but a linked list can
dynamically grow and new nodes can be inserted anywhere
in the middle of the list.

Is this really your first experience with linked lists??

"GS" wrote in message

...





That's a bit more helpful but doesn't answer my Q about a 'linked list'..- Hide quoted text -


- Show quoted text -


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use VBA to reset data validation (=list) value to first value in that list (list is a named range) ker_01 Excel Programming 7 October 27th 08 03:13 PM
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 4 May 1st 07 05:49 PM
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 2 April 29th 07 11:09 PM
How to view a list of data based on another list of data Adnan Excel Discussion (Misc queries) 3 April 10th 07 05:22 PM
converting vertical data list to horizontal data list tjb Excel Worksheet Functions 2 July 15th 06 02:17 AM


All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"