按照中点优先顺序遍历线性表:已知线性表list以顺序存储方式存储,要求按如下顺序输出list所有节点值:首先输出线性表list中点位置元素值,然后输出中点左部所有元素值,再输出中点右部所有元素值;无论输出中点左部所有元素值还是输出中点右部所有元素值,也遵循以上规律。例如:已知数组list中元素值为:18 32 4 9 26 6 10 30 12 8 45则list中元素按中点优先顺序遍历的输出结果为:6 4 18 32 9 26 12 10 30 8 45试采用递归算法实现该遍历问题。
查看答案
假设稀疏矩阵A和B都采用三元组表示,设计一个算法计算C=A*B,即实现稀疏矩阵相乘。要求C也采用三元组表示。算法函数接口为:
按照层次划分,一般把商圈划分为
A. 总体商圈
B. 核心商圈
C. 次级商圈
D. 边缘商圈
1. The writer wanted to find a part-time job because ________.A. he was in need of a computerB. he didn’t have enough moneyC. his parents didn’t have much moneyD. he wanted to gain work experience2. When the writer entered the restaurant, ________.A. he was disappointedB. he was tired and dirtyC. he was refused againD. there were five other students3. The boss required ________.A. a clean boyB. a hard-working boyC. a clean and hard-working boyD. a clever boy4. The boss expected the writer to work ________ every day.A. 2 hoursB. 3 hoursC. 4 hoursD. 5 hours5. By the end of the story, ________.A. the writer was employed by the bossB. the boss agreed to give the writer a tryC. the writer was refused by the bossD. the boss asked the writer to wait for his call