ChunkList 1 INTRODUCTION A ChunkList is like a regular linke

ChunkList 1 INTRODUCTION A ChunkList is like a regular linked list, except each node contains a little fixed size array of elements instead of just a single element. Each node also contains its own \"size int to know how full it is. The ChunkList will have the following features... The Chunk List object contains a head pointer to the first chunk, a tail pointer to the last chunk, and an int to track the logical size of the whole collection. When the size of the list is 0, the head and tail pointers are null. head tail size 16 null next next next next 8 1 2 5 Size Size Size Size values values values 10 values 12 Each chunk contains a fixed size ltemTypeO array, an int to track how full the chunk is, and a next pointer. There should be a constant ARRAY SIZEE 8 that defines the fixed size of the array of each chunk. Elements should be added to the array starting at its 0 index. Elements in each little array should be kept in a contiguous block starting at 0 (this will require shifting elements around in the little array at times). You may want to test ARRAY SIZE set to smaller values, but turn it in with ARRAY SIZE set to 8. The empty collection should be implemented as null head and tail pointers. Only allocate chunks when actually needed.

Solution

what is the advantage of Chunklist approach as opposed to the unsorted link list implimentation given in the chapter 3?

Ans: The main advantage of the chunklist is that it gives a solution for the store of list pf observations.

chunks means list of arrays. Here when we use the list we can come across differentn advantages they are as follows. In list we can easily elements at any point, they are less memory or storage expensive. so we can increase the performance by using the chunklist. so that we can increase or decrease the storage depending on our usage or depending on the program.

 ChunkList 1 INTRODUCTION A ChunkList is like a regular linked list, except each node contains a little fixed size array of elements instead of just a single el

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site