views:

38

answers:

1

Hi,

I wanted to know meaning of dynamic linked data structure? Please give some example.Which data structures can be classified as static linked data structures and which can be classified as dynamic linked data structures ?

Thanks.

+1  A: 

Dynamic data structures allocate blocks of memory from the heap as required, and link those blocks together into some kind of data structure using pointers. When the data structure no longer needs a block of memory, it will return the block to the heap for reuse. This recycling makes very efficient use of memory.

• Static data structures such as arrays allow - fast access to elements - expensive to insert/remove elements - have fixed, maximum size

• Dynamic data structures such as linked lists allow - fast insertion/deletion of element - but slower access to elements - have flexible size

-- Hope it helps. Chris

cr0z3r