Exercises and media
This page shows how exercises, recorded lectures, and diagrams are presented on the course site.
A single exercise
Section titled “A single exercise”<Exercise> renders one exercise as an inline link with a difficulty badge — use it when a single exercise doesn’t warrant a full list, for example inline in a paragraph.
A list of exercises
Section titled “A list of exercises”<ExerciseList> takes a list of exercises and shows each difficulty level as a labeled Badge:
- The classic first exercise.
- Implement addition, subtraction, multiplication, and division.
- Calculate n! recursively and iteratively — compare the two solutions.
- Implement a BST with insert, search, and in-order traversal.
Recorded lectures
Section titled “Recorded lectures”<Youtube> embeds a YouTube video with a responsive 16:9 layout.
Here, a video is combined with a :::caution box to flag outdated material in the recording:
Mermaid diagrams
Section titled “Mermaid diagrams”Mermaid renders diagrams directly from text. Three examples:
Sequence diagram
Section titled “Sequence diagram”sequenceDiagram participant Browser participant Server Browser->>Server: GET /api/data Server-->>Browser: 200 OK + JSON Browser->>Browser: Update DOMClass diagram
Section titled “Class diagram”classDiagram class Animal { +String name +int age +speak() String } class Dog { +fetch() } class Cat { +purr() } Animal <|-- Dog Animal <|-- CatFlowchart
Section titled “Flowchart”flowchart TD A[Start program] --> B{Valid input?} B -- Yes --> C[Compute result] B -- No --> D[Show error message] C --> E[Print answer] D --> F[Ask for new input] F --> B E --> G[Exit]