3、画出下列广义表的两种存储结构图:A = (( ),a,(b,(c,d)),(e,f))
时间: 2023-09-18 08:12:18 浏览: 378
链式存储结构图:
```
+----+ +---+ +----+
A: head | | | a | | |
+----+ +---+ +----+
| | |
| | +------+ +------+
| +--------| | | d |
| +------+ +------+
+----+ +---+ | |
| | | b | +------+
+----+ +---+ | |
| | +------+ +------+
| | | c | | e |
| | +------+ +------+
| | |
| | +------+ +------+
| +--------| | | f |
| +------+ +------+
|
|
```
顺序存储结构图:
```
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
A: | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | | | |
| | | | |
v v v v v
a b c d e
|
|
v
f
```
阅读全文