Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 2.28 KB

File metadata and controls

78 lines (52 loc) · 2.28 KB

Session 3 | Part 2

Part 2 is quiz practice. These quizzes review complexity and the material from the lecture slides about hard-to-solve algorithms.

1. Goal

You will practice:

  • time and space complexity
  • exponential and factorial growth
  • divide and conquer
  • greedy methods
  • recursion and Fibonacci
  • dynamic programming
  • P, NP, NP-hard, and NP-complete

2. Prerequisites

From the session3 folder:

source .venv/bin/activate
pip install -r requirements.txt

Windows PowerShell:

.venv\Scripts\Activate.ps1
pip install -r requirements.txt

3. Call Stelios to challenge you

Before starting the quizzes, call Stelios for one quick challenge question from the Session 3 challenge box.

4. Multiple-choice quiz

This quiz checks the core material from the lecture: time complexity, space complexity, recursion, greedy methods, dynamic programming, and P/NP ideas.

quizmd --full-screen quizzes/python-complexity-and-algorithms-quiz.md

5. Chaos quiz

The chaos quiz gives you a scenario and asks you to recover from bad design decisions. It focuses on choosing between streaming, generators, recursion, dynamic programming, and greedy shortcuts.

quizmd --full-screen quizzes/python-complexity-and-algorithms-chaos-quiz.md

6. Session 2 chaos quiz

This chaos quiz reviews Session 2 material. It asks you to repair a messy CSV cleaning pipeline using DictReader, dictionary keys, missing-value checks, strip(), raw versus cleaned copies, and complexity.

quizmd --full-screen quizzes/python-session-02-data-cleaning-chaos-quiz.md

7. Reverse quiz

The reverse quiz asks you to infer the concept from an output, a code snippet, or a short description. It is designed to test whether you can recognise an algorithmic idea when it appears in a different form.

quizmd --full-screen quizzes/python-complexity-and-algorithms-reverse-quiz.md

8. Optional validation

If you want to check quiz file format:

quizmd --validate quizzes/python-complexity-and-algorithms-quiz.md
quizmd --validate quizzes/python-complexity-and-algorithms-chaos-quiz.md
quizmd --validate quizzes/python-session-02-data-cleaning-chaos-quiz.md
quizmd --validate quizzes/python-complexity-and-algorithms-reverse-quiz.md