028 · Clemson CPSC2121 Lab 1 — 链表栈与队列
| 项目 | 内容 |
|---|---|
| 学校 | Clemson University |
| 课程 | CPSC 2121 Data Structures and Algorithms |
| 方向 | C++ / 模板链表、栈与队列 |
| 语言 | C |
| 难度 | 进阶 / Intermediate |
| 上游仓库 | https://github.com/russellocean/CPSC2121(学生作业仓库,含完整实现与 |
为什么收录
带官方样例测试(T1–T22)的完整作业:模板链表 List + 基于它的 ListStack / ListQueue。upstream 是学生提交版,其实现存在5 处真实缺陷,我们的 solution 是修复版——学生可对比 upstream 原版找 bug,本身就是练习。
A complete lab with official sample tests. The upstream student submission contains 5 real defects; our solution is the fixed version — diffing the two is itself an exercise.
实测结果
- 官方 13 个样例全部通过(T1–T22 中带 main 的 13 个)
- 边界测试 5 组全过:空表
getFirst/getLast/getAt返回T()、空栈pop与空队列dequeue返回T()、LIFO/FIFO 语义、List 的增删查 - upstream 学生实现通过全部 13 个样例但仍有 5 处缺陷(
size()缺 return、空容器解引用空指针等),全部落在样例覆盖之外