I know how to implement linked list using array. For example we define a struct as follow:
struct Node{
int data;
int link;
}
\"dat
Can anybody tell me what is the advantage and disadvantage of implementation of linked list using array compared to "ordinary" linked list?
linked lists have the following complexity:
if your representation uses a strict, contiguous array, you will have different complexity:
That is, a linked list API implemented in terms of arrays will behave like an array.
You can mitigate this somewhat by using a linked list or tree of strict arrays, leading to ropes or finger trees or lazy sequences.