算法与数据结构单选难度 3真题改编 · 2026
2507. 在某策略游戏中,玩家的回合记录使用栈来保存。玩家依次进行了动作8, 7, 3, 4, 11, 10, 1, 5, 2, 6, 9。回顾的顺序为8, 7, 3, 1, 9, 6, 2, 5, 10, 11, 4。在游戏过程中,允许玩家回顾动作。为了实现这种功能,栈的容量至少为多少?()
练习本题 ›
编程语言单选难度 3真题改编 · 2024
2542. 以下程序
#include <stdio.h>
void fun(char **p) {
int i;
for (i = 0; i < 4; i++)
printf("%s", p[i]);
}
main() {
char *s[6] = {"ABCD", "EFGH", "IJKL", "MNOP", "QRST", "UVWX"};
fun(s);
printf("\n");
}
程序运行后的输出结果是?
练习本题 ›