Skip to main content

Semester Exam

Required Output Classification

Required outputClassificationPublic/private guidance
Timed written answers, diagrams, code snippets, and design responsesCheckpoint evidenceKeep raw exam work private so it remains useful for assessment and retake calibration.
Post-exam review notes, missed-answer repairs, and Feynman explanationsPractice artifactUse for spaced review; publish only rewritten explanations that no longer reveal exam solutions wholesale.
Capstone-defense or architecture-defense packets created from exam promptsPortfolio candidatePolish publicly only when they are original to your project, sanitized, and framed as engineering rationale rather than exam answers.
info

Suggested duration: 90 minutes. Closed book for Parts A-C. Blank paper or a blank editor is allowed. Part D may use a hand-drawn diagram, but not notes or slides.


Part A - Theory Questions

tip

Suggested time box: 20 minutes. Short written answers. Aim for clarity, not volume.

  1. Explain when binary search is valid, why it is faster than simple search, and what O(log n) means in practice.
  2. Distinguish an abstract data type, a concrete data structure, and a database with one example that connects all three.
  3. Explain how an algorithm fits into the larger CS stack: problem model, algorithm, data, language, operating system, and hardware.
  4. Explain why naming and small functions matter even in a tiny project.
  5. Explain why testing and Git belong in Semester 0 instead of waiting for later programming semesters.

Part B - Problem-Solving Challenges

Grading Note

Show your reasoning. Partial credit comes from clear steps, not only the final answer.

Challenge 1: Trace Search And Compare Growth

Use the sorted list below:

[3, 7, 12, 18, 23, 31, 38, 41, 49, 57, 64]

  1. Trace binary search for the value 41 by listing low, high, mid, and the decision at each step.
  2. How many comparisons does your trace take?
  3. Compare that result to a simple left-to-right search on the same list.
  4. State one condition that would make binary search invalid here.

Challenge 2: Design The Data Shape

You are building the Semester 0 project. The app must:

  • log study sessions by date, module, duration, and note
  • show weekly streak and total minutes
  • visualize one algorithm step by step

Answer these:

  1. What data shape or structure would you use for stored study sessions, and why?
  2. What data shape would you use for the algorithm visualization steps, and why?
  3. What logic should live outside the UI layer?
  4. If you had to persist the app with the least complexity, what storage choice would you start with?

Challenge 3: Diagnose The Bottleneck

Read this pseudocode:

for each student in students:
for each session in allSessions:
if session.studentId == student.id:
totalMinutes = totalMinutes + session.minutes

Answer these:

  1. What growth pattern does this suggest at a high level?
  2. Why could this become wasteful as data grows?
  3. Suggest one better approach using a different data shape or pre-processing step.
  4. Name one unit test you would write around the improved logic.

Part C - Code Review Exercises

note

Find correctness issues, clarity problems, and missing tests. The point is not language mastery; the point is disciplined reasoning.

Review 1

Code:

function longestStreak(days) {
let streak = 0;
let best = 0;

for (let i = 0; i < days.length; i++) {
if (days[i]) {
streak++;
} else {
best = streak;
streak = 0;
}
}

return best;
}

Tasks:

  • Identify at least three issues with correctness or robustness.
  • Propose two unit tests that would expose the bug.
  • Suggest one small refactor that keeps the behavior easy to review in Git.

Review 2

Code:

function binarySearch(list, target) {
let low = 0;
let high = list.length;

while (low < high) {
const mid = Math.floor((low + high) / 2);

if (list[mid] === target) return mid;

if (list[mid] < target) {
low = mid;
} else {
high = mid - 1;
}
}

return -1;
}

Tasks:

  • Identify the off-by-one or termination problems.
  • Propose two unit tests, including one failure case.
  • Describe the smallest safe correction before any larger refactor.

Part D - Feynman Challenge

caution

No slides. Speak or write as if you are teaching a motivated beginner who has never seen this material.

Prompt: Explain how your Semester 0 project connects tracked study behavior, one algorithm visualizer, clean code structure, and the path from source code to hardware.

Rubric (self-score 1-4):

Criterion1234
Simple languageMostly jargon or vague termsSome simple wording, but still abstractClear wording with only minor jargonPlain language throughout
AccurateMajor errorsSome correct points, but important gapsMostly correct with small slipsCorrect and precise
Coherent story arcDisconnected factsPartial flowClear beginning, middle, endStrong narrative that builds naturally
Uses one analogy or diagramNoneAttempted but weakUseful analogy or simple diagramAnalogy or diagram makes the idea memorable

Your response:





Exam Reflection

  1. Which part felt strongest, and what concrete evidence supports that?
  2. Which weak area would most likely hurt you in Semester 1 if you ignored it now?
  3. What one change will you make to your workflow before the next semester starts?

Mastery Rubric

LevelEvidence
Beginner passCan answer direct questions and complete familiar exercises with light notes.
Solid passCan solve new variants, explain choices, and connect the work to Pre-Semester Launchpad.
Strong passCan defend tradeoffs, identify failure modes, and produce clean evidence in the portfolio artifact.
Not readyRelies on copied solutions, cannot explain mistakes, or lacks durable artifacts.

Retake and Repair Rule

If a section is weak, do not only reread. Repair it by producing new evidence: a corrected solution, a fresh implementation, a rewritten proof, a benchmark, a diagram, a runbook, or a short teaching note.


Answer-Quality Examples

Use these examples when grading written answers or spoken explanations.

QualityExample pattern
WeakNames a concept but gives no example, constraint, or failure case.
AcceptableDefines the concept and applies it to a familiar exercise.
StrongApplies the concept to a new variant and explains why an alternative would fail.
Portfolio-readyConnects the concept to Pre-Semester Launchpad, current project evidence, and a future capstone decision.

Interleaving Prompt

For any missed answer, add one sentence starting with: This depends on an earlier skill because...

Calibration Materials

Use these learner-visible calibration materials before self-grading or requesting review: