دسته بندی | فناوری اطلاعات |
بازدید ها | 5 |
فرمت فایل | doc |
حجم فایل | 1150 کیلو بایت |
تعداد صفحات فایل | 123 |
Sequential representation successive nodes of the data object are stored a fixed distance apart order of elements is the same as in ordered list adequate for functions such as accessing an arbitrary node in a table operations such as insertion and deletion of arbitrary elements from ordered lists become expensive Linked representation successive items of a list may be placed anywhere in memory order of elements need not be the same as
To insert GAT between FAT and HAT
(1) get a node N that is currently unused ; let its address be x
(2) set the data field of N to GAT
(3) set the link field of N to point to the node after FAT, which contains HAT
(4) set the link field of the node containing FAT to x
data |
link |
||
1 |
HAT |
15 |
|
2 |
|||
3 |
CAT |
4 |
|
4 |
EAT |
9 |
|
5 |
|||
6 |
|||
7 |
WAT |
0 |
|
8 |
BAT |
3 |
|
9 |
FAT |
1 |
|
10 |
|||
11 |
VAT |
7 |
|
. . . |
order in list each data item is associated with a pointer (link) to the next item