- A Typical Node In A Doubly Linked List Has Three Fields A Data Field A Left Link Field And A Right Link Field To Imp 1 (343.1 KiB) Viewed 30 times
A typical node in a doubly linked list has three fields: a data field, a left link field, and a right link field. To imp
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
A typical node in a doubly linked list has three fields: a data field, a left link field, and a right link field. To imp
A typical node in a doubly linked list has three fields: a data field, a left link field, and a right link field. To improve space efficiency, we may implement a doubly linked list using only two fields per node: a data field a and a linked field that is derived from the left and right links using the bitwise XOR operation. Suppose the list {HAT, CAT, EAT, BAT} is stored as a doubly linked list by the following three-field representation: Address Ox0061FF14 0x0061FF08 Ox0061FEFC Ox0061FEFO Data HAT CAT EAT BAT Left link 0 Ox0061FEFC 0x0061FF14 0x0061FF08 Ox0061FEFC Ox0061FEFO Right link Ox0061FF08 0 What are the values of (1)-(4) for the corresponding two-field representation? (8%) (5)Explain how to traverse a two-field doubly linked list from left to right and from right to left. (5%) Address Ox0061FF14 0x0061FF08 0x0061FEFC Ox0061FEFO Data HAT CAT EAT BAT Link (1) (2) (3) (4)