How to use the assistant

1. Get an OpenRouter key

Create a free account at openrouter.ai and make an API key. Paste it into the key field — it goes only to openrouter.ai when you generate, and is remembered only if you opt in. Free models work without buying credits.

2. Pick a drill and a model

Start on the home page and pick one of the four drills — iterative or recursive, binary tree or binary search tree — to match what you want to practice. Each opens its own page (bookmark it to come straight back), where the model picker lists free models first and stronger paid ones below; if the list fails to load, type any OpenRouter model id. Use "All question types" to switch drills.

3. Generate, solve, then reveal

Generate a question and try to solve it on paper or in your editor before pressing "Show solution" — the two walkthroughs are designed so the first one clarifies the problem without spoiling the approach. Generate another question when you are done; the assistant steers the model away from your last few questions.

Study tips

  • BST solutions should follow a single path down the tree in O(log n) — if a generated BST solution visits every node, treat it as a red flag and generate a fresh question.
  • Iterative questions must use loops, recursive ones must use recursive calls — check the solution honors this before trusting it.
  • Questions are AI-generated: read them critically, and see About & privacy for what that means.

The course notes behind this

The drills rehearse one chapter's code. These are the pages behind them — one working implementation to compare your answer against, not a marking key: yours may differ and still be right.