implement linked list using array - advantages & disadvantages
问题 I know how to implement linked list using array. For example we define a struct as follow: struct Node{ int data; int link; } "data" stores the info and "link" stores the index in the array of next node. Can anybody tell me what is the advantage and disadvantage of implementing a linked list using array compared to "ordinary" linked list? Any suggestion will be appreciated. 回答1: If you back a linked list with an array, you'll end up with the disadvantages of both . Consequently, this is