Competitive Programming

CS 312 - Fall 2026


Course Staff

Coach Tiago Januario
Coach Assistants Luis Carvalho
Jay Patel
Saniya Kureshi
Thun Jirachaisri

Course Description

This course prepares students for technical interviews and ICPC-style competitive programming, emphasizing algorithmic problem solving, efficient C++ implementation, time and memory complexity analysis, independent debugging, contest strategy, and clear explanation of solutions. The course also emphasizes academic integrity and code ownership, ensuring that students develop both strong technical skills and responsible programming practices.


Course Format

  • Format: 3-hour per week workshops with intense coding.
    • Hour 1: Mini-Lecture (No Devices Allowed)
    • Hour 2: Group Workshop (No Devices Allowed)
    • Hour 3: Implementation Lab (Laptops Open)
  • Laptops and phones are banned during Hours 1 & 2: If you open a device before Hour 3 starts, you may be marked abscent.
  • No AI code generation: Tools like ChatGPT, Copilot, Claude, and Cursor are prohibited for writing code.
  • Attendance: Mandatory for all lectures.

Communication and Office hours

  • Online course communication happens through Piazza.
  • Use public Piazza posts for general course questions.
  • Use private Piazza posts for personal matters, accommodations, token requests, and code-related questions.
  • Discussion Rules: Share ideas on Piazza, but never share your code publicly.
  • Email should be used only when Piazza is unavailable or inappropriate.

Learning Goals

By the end of this course, you will:

  • Translate programming logic into efficient C++ code.
  • Master the Standard Template Library (STL).
  • Identify common patterns in Technical Interviews.
  • Manage time effectively during high-pressure contests.

We focus on:

  • Debugging: Finding errors without help.
  • Math & Logic: Thinking strictly and formally.
  • Speed: Writing accurate code quickly.
  • Consistency: Solving problems every single week.

Tools & Textbooks

Required Language and Software (No AI Allowed)

All submitted programming assignments must be written in C++ unless explicitly stated otherwise. Use one of these AI-Free editors.


Grading

The course uses a 1000-point system.

Component Points Description
Weekly Coding Assignments 300 12 assignments. Each week has 7 problems. Full credit requires solving 5 out of 7 problems.
Written Exams 200 2 written exams, 100 points each.
Contests 150 2 contests: one solo contest and one team contest.
Buggy Reports 100 10 short debugging assignments.
Code Review Checks 100 Short individual meetings where students explain their submitted code.
Oral Exam 150 Required to pass. Students explain and defend one or more of their own submitted solutions.
Attendance Required Students must attend at least 75% of class meetings to pass. Attendance does not add points.

Here is the course grade Scale

Grade Points
A 930–1000
A- 900–929
B+ 870–899
B 830–869
C 700–829
F Below 700

A student will also receive an F if they:

  • fail the Oral Exam,
  • fail to meet the attendance requirement,
  • commit a serious academic integrity violation.

The instructor may lower grade cutoffs, but cutoffs will not be raised.


Token Policy

Each student starts with 3 tokens. A token may be used to extend a weekly assignment deadline by 24 hours, or excuse one missed lecture. Tokens cannot be used for written exams, bug reports, contests, or the Oral Exam. Tokens cannot be used retroactively. Unused tokens have no grade value. To use a token:

  1. Complete the Token Request Form.
  2. Send a private Piazza post to the course staff.
  3. Do both before the relevant deadline.

Buggy Reports

Buggy Reports are collaborative team assignments (2–3 students) submitted on Gradescope. Teams analyze flawed C++ code, diagnose failure modes, and submit a single report containing:

  • Root Cause: Concise technical explanation of why the code fails.
  • Bug Identification: Exact line number(s) and error classification (e.g., TLE, logic error, undefined behavior).
  • Minimal Counterexample: The smallest valid test case that triggers the failure.
  • Patched Code: Corrected C++ snippet.

Note: One student submits per group and tags team members. Any group member may be asked to defend their report during individual Code Review Checks.


Weekly Coding Assignments

There will be 12 weekly coding assignments. Each assignment contains at least 7 problems. Full credit requires solving at least 5 problems.

Weekly Deadlines

Deadline Requirement
Tuesday 11:59 PM ET Submit at least 2 accepted problems.
Thrusday 11:59 PM ET Submit the remaining problems.

Missing the Tuesday checkpoint results in a 10% penalty on that week’s assignment score unless a token is used before the checkpoint deadline. Students should submit problems as they solve them. Submitting many solutions in a short period of time may trigger an authorship review.


Written Exams

There will be 2 written exams, each worth 100 points. Written exams are closed-device and individual. Exams may include:

  • algorithm design,
  • complexity analysis,
  • code tracing,
  • debugging,
  • proofs or correctness arguments,
  • short C++ or pseudocode questions.

Contests

There will be 2 official course contests: Solo Contest and Team Contest. Contest rules will be announced before each contest. During contests:

  • no AI tools are allowed,
  • no public solutions or editorials are allowed,
  • no communication outside the allowed team is permitted,
  • all submitted code must be understood by the person or team submitting it.

Problems not solved during a contest may be upsolved by Monday 11:59 PM for 50% credit. Upsolving must follow the same academic integrity and AI rules as regular assignments.


Oral Exam

The Oral Exam is required to pass the course. Students will be asked to explain one or more of their own previous submissions.

Component Points Description
High-Level Idea 50 Explain the algorithm and why it works.
Code Walkthrough 50 Explain variables, control flow, and implementation details.
What-If Question 50 Reason about a changed constraint, edge case, or code modification.

A student fails the Oral Exam if they cannot explain the main idea of their own submitted solution. Failure of the Oral Exam results in an automatic F in the course.


Code Review Checks

Code Review Checks are a regular graded part of the course. Each student will complete 2 short individual code review meetings during the semester, worth 50 points each. During a Code Review Check, the student will be asked to explain one of their submitted solutions. The course staff may ask the student to:

  • explain the high-level algorithm,
  • walk through important parts of the code,
  • explain the role of specific variables or functions,
  • trace the code on a small input,
  • analyze time and memory complexity,
  • discuss an edge case,
  • describe a bug they encountered,
  • make a small modification to the code.

Students will receive reasonable notice before a Code Review Check. The specific problem to be discussed will be selected by the course staff.

Component Points Description
Algorithm Understanding 20 Explains the main idea of the solution and why it works.
Code Understanding 15 Explains variables, functions, and implementation details.
Complexity and Edge Cases 10 Correctly analyzes complexity and discusses important edge cases.
Communication 5 Explains clearly and responds to questions thoughtfully.

Academic Integrity and AI Policy

You may discuss ideas, but you may not share, view, copy, or submit someone else’s code. This is a strict C++ programming course. AI tools may not be used to generate assignment code.


Attendance Policy

Students must attend at least 75% of class meetings to pass the course. A token may be used to excuse a missed lecture. Students with documented accommodations should contact the instructor privately.


Schedule

Date Topics (Lecture) Readings Practice
Sep 04 Fast-Track C++ & STL
  • Fast I/O, std::vector
  • std::map, std::set, Iterators
Sep 11 Core Patterns I
  • Two Pointers
  • Prefix Sums
  • Custom Sorting & Comparators
Sep 18 Core Patterns II
  • Binary Search (Search on Answer)
  • Ternary Search
Sep 25 Core Patterns III
  • Greedy Strategies
  • Complete Search & Pruning
Oct 02 Recursion & Trees
  • Backtracking & Recursion
  • Tree Traversal & Tree Basics
Oct 09 Midterm Week & Practice Defense
  • Written Exam (45 minutes)
  • Practice Oral Check-in (Ungraded)
  • Solo Speed Contest (2 Hours)
-
  • Upsolving Contest Problems
Oct 16 Graph Theory I
  • BFS & DFS
  • Flood Fill & Connected Components
Oct 23 Graph Theory II
  • Shortest Paths (Dijkstra)
  • Disjoint Set Union (DSU)
Oct 30 Dynamic Programming I
  • Recursion to Memoization
  • 1D DP (Coin Change)
Nov 06 Dynamic Programming II
  • 2D DP & Grid Paths
  • Longest Common Subsequence
Nov 13 Advanced Structures
  • Segment Trees
  • Range Sum & Range Minimum Queries
Nov 20 Number Theory
  • Modulo Arithmetic & GCD
  • Extended Euclidean & Primes
Nov 27 Thanksgiving Classes suspended -
Dec 04 Final Exam
  • Written Exam (45 minutes)
  • Group Contest (ICPC Style)
- -
Dec 11 Final Oral Exam
  • Code Explanation & Conceptual Defense
  • Booking link provided on Piazza
- -