ICPC UNIVERSITY

Search the commons

Start typing to search pages, curriculum topics, practice, tools, and events.

Course III · Championship

Connect advanced techniques.

A guided championship module spanning advanced trees, strings, optimization, and deliberate validation.

LEARN · ICPC U
LEARNExplore the commons

COURSE III · CHAMPIONSHIP · VERSION 2

Advanced trees and string matching

Estimated time
6–8 hours
Prerequisites
Course II structures, DFS trees, and complexity analysis

Measurable outcome: Decompose a tree problem, recognize when offline preprocessing is useful, and implement one linear-time string matcher.

01 · LEARN

Concept checklist

  • Euler tours and subtree intervals
  • Binary lifting and lowest common ancestors
  • KMP prefix function and border reasoning
  • Aho–Corasick as trie plus failure links
Open the attributed reference ↗
02 · BUILD

Implementation lab

  1. Flatten a rooted tree and answer subtree queries.
  2. Implement binary lifting with an explicit sentinel policy.
  3. Implement prefix-function matching and test periodic strings.
04 · VERIFY

Exit criteria

  • Explain the key invariant without notes.
  • Reimplement the core technique in one sitting.
  • Solve two mapped tasks without editorial help.
  • Record one mistake and the test that exposes it.
Open the full starter set →

Keep moving

Your next step
is ready.

Continue to Course IV