Skip to content

Add an exam questions page, by level from 1 to 4 - #4

Merged
ethan42 merged 2 commits into
mainfrom
exams-by-level
Oct 9, 2026
Merged

ethan42 merged 2 commits into
mainfrom
exams-by-level

Conversation

@ethan42

@ethan42 ethan42 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Adds a page with every exam question (108) sorted into four levels, so you can practise from easiest to hardest:

  • New page: questions/exam-questions.md, generated by tools/gen-exercises.py and linked from the home page and the question bank. Each entry opens the question's own page on the study site (statement + hint), not the exam PDF.
  • Question pages: exam questions now show «Επίπεδο N/4» and a navigation row with previous and next links within the same level. The order comes from the generated _data/exams.yml.
  • Scale: a new level field (1–4), only on exam questions; the guide-wide ★ difficulty is unchanged. The rubric is in STYLE.md:
    1. short question, not a whole program (trace or explain code, short function)
    2. simple complete program reading stdin or argv, one loop or a simple double loop (usually Θέμα 3)
    3. data structures and heap memory (lists, trees, malloc/free)
    4. the hardest θέμα, usually the last one (files, dynamic programming, non-obvious algorithms)
  • Lint: exam questions must have a level, and other questions must not have one.

Counts: level 1: 14 · level 2: 53 · level 3: 25 · level 4: 16.

Ratings to review

I rated each question by reading it against the rubric. Position in the exam was a hint, but the content decided. Edit level: in any question file and run tools/gen-exercises.py to regenerate.

Ratings that go against the position hint:

  • Θέμα 3 rated 4: exam-2023-dec-q3 (dynamic programming), exam-2024-dec-q3 (3-sum faster than O(n³)), exam-2024-jul-q3 (greedy algorithm with a proof).
  • Θέμα 1 rated 2: exam-2023-dec-q1, exam-2024-dec-q1 and exam-2024-jul-q1 are complete programs that read their input.
  • Last θέμα rated below 4: exam-2026-jan-q6 is 1 (explain a NULL dereference) and exam-2024-jul-q4 is 3 (tree traversal).
  • Borderline: exam-2026-jun-q3 (stonks, 2 or 3?) and exam-2026-jun-q4 (scoreboard, 3 or 4?).

2023 online exam: every θέμα is a whole program, so there is no level 1.

  • In four variants the levels don't rise from θέμα 1 to θέμα 4, because the hard one is θέμα 2 or 3: ex7 (2,2,4,2), ex11 (2,2,3,2), ex13 (2,3,3,2) and ex15 (2,2,3,2).
  • Borderline: ex12-q4 and ex13-q4 (2 or 4?), ex4-q3 (2 or 3?), and ex5-q4, ex10-q4 and ex13-q3 (3 or 4?).
All regular exams (44)
id Τίτλος ★ Μονάδες Επίπεδο Γιατί
exam-2023-dec-q1 Κάντο όπως ο Βιετά ★★☆ - 2 argv count, one loop computing Viète product
exam-2023-dec-q2 Εαυτοί Αριθμοί ★★☆ - 2 argv range, simple double loop over digits
exam-2023-dec-q3 Σκαλί-Σκαλί ★★☆ - 4 stair counting needs dynamic programming, complexity bound, overflow
exam-2023-dec-q4 Το Νερό Νεράκι ★★★ - 4 trapping rain water in O(n), minimal memory
exam-2024-dec-q1 Προσεγγίζοντας το π ★☆☆ - 2 complete argv program, one loop Wallis product
exam-2024-dec-q2 Οι Καλύτεροι Αριθμοί, Παμψηφεί ★★☆ - 2 argv range, double loop digit check
exam-2024-dec-q3 Η Τριπλέτα Στόχος ★★★ - 4 3-sum faster than O(n^3): sort + two pointers
exam-2024-dec-q4 Λύσε τον Λαβύρινθο ★★★ - 4 maze path down/right, DP over grid from stdin
exam-2024-jul-q1 ASCII Encoding ★☆☆ - 2 stdin character loop, hex output
exam-2024-jul-q2 Στατιστικές ★★☆ - 2 argv ints, mean and std deviation
exam-2024-jul-q3 Βέλτιστη Μοιρασιά Πίτσας ★★★ - 4 greedy with sorting, prove optimality, complexity
exam-2024-jul-q4 Reverse Inorder Traversal ★★☆ - 3 recursive reverse inorder on binary tree
exam-2024-sep-q1 Η συνάρτηση about ★☆☆ 5 1 short function printing three lines
exam-2024-sep-q2 Η συνάρτηση what ★☆☆ 10 1 trace binary search, explain function
exam-2024-sep-q3 Εύρεση μηδενός σε πίνακα ★★☆ 15 1 short function: binary search on sorted array
exam-2024-sep-q4 Μετρητής λέξεων ★★☆ 25 2 stdin word count, one loop with state
exam-2024-sep-q5 Αντιστροφή λίστας ★★☆ 25 3 reverse linked list into new heap-allocated list
exam-2024-sep-q6 Γεμίζοντας με χρώμα ★★★ 25 4 flood fill from file via argv, recursion/BFS
exam-2025-jan-q1 Mystery ★☆☆ 10 1 trace loop with shifts on given input
exam-2025-jan-q2 Η συνάρτηση dog ★☆☆ 10 1 explain/trace string concatenation function
exam-2025-jan-q3 Κινούμενος Μέσος Όρος - sma ★★☆ 25 2 argv ints, moving average over last 10
exam-2025-jan-q4 Αθροιστής Δέντρων - sumtree ★☆☆ 20 3 recursive sum over binary tree
exam-2025-jan-q5 Συνένωση Αλφαριθμητικών - join ★★☆ 20 3 join strings into heap-allocated result
exam-2025-jan-q6 Μετρώντας τα Αστέρια - stars ★★★ 25 4 file grid, 2D prefix sums for repeated queries
exam-2025-sep-q1 Mystery ★☆☆ 10 1 trace digit-sum loop
exam-2025-sep-q2 Η συνάρτηση transform ★☆☆ 15 1 explain/trace in-place string reverse
exam-2025-sep-q3 Μέση Τιμή Τυχαίων Μεταβλητών - mean ★☆☆ 25 2 argv value/probability pairs, one loop
exam-2025-sep-q4 Μεσαίο Στοιχείο Λίστας ★★☆ 25 3 middle of linked list, new heap node
exam-2025-sep-q5 Το Καλό το Μονοπάτι - path ★★★ 25 4 min-cost grid path DP from file
exam-2026-jan-q1 Mystery ★☆☆ 10 1 trace loop with bit masking
exam-2026-jan-q2 Η συνάρτηση compute ★★☆ 15 1 explain/trace merge, memory class, spot bug
exam-2026-jan-q3 Εύρεση Πρώτων Παραγόντων - factor ★★☆ 25 2 argv int, prime factorisation loop
exam-2026-jan-q4 Διερμηνέας Αριθμητικών Εκφράσεων - eval ★★☆ 25 3 recursive evaluation of expression tree
exam-2026-jan-q5 Περικύκλωση - encirclement ★★★ 25 4 grid reachability/flood fill from stdin, error handling
exam-2026-jan-q6 Ο Στέργιος Ξαναχτυπά ★☆☆ 10 1 reason about NULL dereference outcome, short
exam-2026-jun-q1 Η συνάρτηση mystery ★☆☆ 15 1 trace shift loop
exam-2026-jun-q2 Η συνάρτηση paws ★★☆ 15 1 explain/trace reverse, find off-by-one bug
exam-2026-jun-q3 Επενδύσεις στο Χρηματιστήριο ★★☆ 45 2 stdin values, min/max plus one-pass best profit
exam-2026-jun-q4 World Cup 2026 ★★★ 35 4 parse match file, aggregate teams, multi-key sort
exam-2026-sep-q1 Mystery ★☆☆ 10 1 trace digit-reverse loop
exam-2026-sep-q2 Η συνάρτηση cons ★☆☆ 15 1 explain/trace run length, spot off-by-one
exam-2026-sep-q3 Το μεγαλύτερο άλμα - polevault ★★☆ 25 2 argv name/score pairs, find maximum
exam-2026-sep-q4 Ν-οστό Στοιχείο Λίστας ★★☆ 25 3 n-th element of linked list into new node
exam-2026-sep-q5 Η Μεγαλύτερη Χωρητικότητα - capacity ★★★ 25 4 max container area, two-pointer O(n)
2023 online exam (64)
id Τίτλος ★ Μονάδες Επίπεδο Γιατί
exam-2023-fall-ex0-q1 Ραβασάκι ★☆☆ 25 2 stdin echo appending a suffix per line
exam-2023-fall-ex0-q2 Ταιριαστές Καρδιές ★★☆ 25 2 argv strings, balanced-hearts check in one loop
exam-2023-fall-ex0-q3 Καλύτερο Ταίριασμα ★★★ 25 3 parse file into structs, store dynamically and sort
exam-2023-fall-ex0-q4 Αγαπήσιμοι Αριθμοί ★★☆ 25 4 palindromic cubes up to 1e18: enumerate cubes, 64-bit
exam-2023-fall-ex1-q1 Δεκαεξαδικοί ★☆☆ 25 2 stdin bytes printed as hex, one loop
exam-2023-fall-ex1-q2 Εντοπισμός Διπλών Ορισμάτων ★★☆ 25 2 argv duplicates, simple double loop
exam-2023-fall-ex1-q3 Περιστροφή Πίνακα ★★☆ 25 3 matrix from file into heap 2D array, rotate
exam-2023-fall-ex1-q4 Debugging ★★☆ 25 3 debug crashing linked-list program with malloc/free
exam-2023-fall-ex2-q1 Pikaκίστικα ★★☆ 25 2 stdin word prefixing, one loop
exam-2023-fall-ex2-q2 Τουρνουά ★☆☆ 25 2 argv all ordered pairs, double loop
exam-2023-fall-ex2-q3 Μίνι Βάση Δεδομένων ★★★ 25 3 parse file records into structs, filter and sort by date
exam-2023-fall-ex2-q4 Ανεβαίνοντας Επίπεδο ★★☆ 25 4 count level-up ways to 50: dynamic programming, 64-bit
exam-2023-fall-ex3-q1 Προσθήκη Νιφάδων ★★☆ 25 2 stdin, insert character between letters
exam-2023-fall-ex3-q2 Φορτωμένο Έλκηθρο ★★☆ 25 2 argv triples summing to target, nested loops
exam-2023-fall-ex3-q3 Εύρεση Λέξεων ★★☆ 25 2 read word file line by line, substring filter
exam-2023-fall-ex3-q4 Χτίζοντας έναν Χιονάνθρωπο ★★★ 25 4 file input, minimum-cost placement needs median insight
exam-2023-fall-ex4-q1 Αναγράμματα ★★☆ 25 2 two argv strings, letter counts for anagram check
exam-2023-fall-ex4-q2 Τα Πάνω Κάτω ★★☆ 25 2 stdin word replacement up/down
exam-2023-fall-ex4-q3 Rickroll Τριπλέτες ★★★ 25 2 brute force over exponents with unsigned 32-bit wraparound
exam-2023-fall-ex4-q4 Αλλαγή Μεγέθους ★★☆ 25 2 binary file copy replacing two bytes at offset
exam-2023-fall-ex5-q1 Αναποδογύρισμα ★☆☆ 25 2 stdin, reverse each line
exam-2023-fall-ex5-q2 Μαγικό Ζευγάρι ★★☆ 25 2 argv digit counts comparison
exam-2023-fall-ex5-q3 Επιλογή ★★☆ 25 3 file records stored dynamically and sorted by score
exam-2023-fall-ex5-q4 Μεταμορφώσιμες Προτάσεις ★★★ 25 3 split sentences into word arrays, bijective word mapping
exam-2023-fall-ex6-q1 Μέγιστος Κοινός Διαιρέτης ★☆☆ 25 2 argv validation and Euclid gcd loop
exam-2023-fall-ex6-q2 Μήνυμα από τον Καίσαρα ★☆☆ 25 2 stdin ROT13 character mapping
exam-2023-fall-ex6-q3 Σπάσε το PIN ★★☆ 25 2 brute-force 4-digit pins against given checker code
exam-2023-fall-ex6-q4 Ταξινόμηση Αρχείων Καταγραφής ★★☆ 25 3 store all log lines dynamically, sort by timestamp
exam-2023-fall-ex7-q1 Ανάβεις Φωτιές ★☆☆ 25 2 stdin, prefix emoji on lines of any length
exam-2023-fall-ex7-q2 Κρυφό Μήνυμα ★☆☆ 25 2 xor two files byte by byte
exam-2023-fall-ex7-q3 Δίδυμοι Πρώτοι ★★★ 25 4 twin primes over huge ranges: (segmented) sieve, heap array
exam-2023-fall-ex7-q4 Κόψιμο Αρχείων ★☆☆ 25 2 copy file except last N bytes
exam-2023-fall-ex8-q1 Άρτια Bits ★☆☆ - 2 argv integers, count set bits
exam-2023-fall-ex8-q2 Αποκωδικοποίηση ★★☆ - 2 stdin hex pairs decoded to characters
exam-2023-fall-ex8-q3 Πολλαπλασιασμός Πινάκων ★★☆ - 3 two matrices from files into heap arrays, multiply
exam-2023-fall-ex8-q4 Ταξινόμηση Πακέτων ★★★ - 3 store packets dynamically from file, sort by id
exam-2023-fall-ex9-q1 Έλεγχος Εκτελέσιμου ★☆☆ - 2 check first four bytes of a file
exam-2023-fall-ex9-q2 Πετυχαίνοντας τον Στόχο ★★☆ - 2 argv triples summing to goal, nested loops
exam-2023-fall-ex9-q3 Πολύτιμοι Πίνακες ★★☆ - 3 matrix from file into heap array, row/column sums
exam-2023-fall-ex9-q4 Κάδρο ★★★ - 3 store unbounded stdin lines on heap to frame them
exam-2023-fall-ex10-q1 Αφαίρεση Μη Λατινικών Χαρακτήρων ★★☆ - 2 stdin character filter, bold first word
exam-2023-fall-ex10-q2 Ασημένιο Κλάσμα ★★☆ - 2 continued fraction in a loop, double precision
exam-2023-fall-ex10-q3 Κρυμμένο Μήνυμα ★★☆ - 3 store all file words dynamically, index by argv positions
exam-2023-fall-ex10-q4 Πλησιάζοντας στον Στόχο ★★☆ - 3 argv points into struct array, sort by distance
exam-2023-fall-ex11-q1 Αναζητώντας τον Blinky ★★☆ - 2 stdin whole-word match and decoration
exam-2023-fall-ex11-q2 Τοποθέτηση του Pacman ★★☆ - 2 grid positions avoiding ghost rows/columns, double loop
exam-2023-fall-ex11-q3 Κινήσεις σε Πλέγμα ★★☆ - 3 grid from file into heap 2D array, torus simulation
exam-2023-fall-ex11-q4 Clyde Πρώτοι ★★☆ - 2 primality of digit rotations, simple loops
exam-2023-fall-ex12-q1 Γραμμή και Γράμμα ★☆☆ - 2 stdin lines merged into one word
exam-2023-fall-ex12-q2 Προσεγγίζοντας την Λέξη ★★☆ - 2 argv wordle-style letter matching, double loop
exam-2023-fall-ex12-q3 Κρεμάλα ★★☆ - 2 filter dictionary file against hangman pattern
exam-2023-fall-ex12-q4 Εαυτοί Αριθμοί ★★☆ - 2 self numbers in range with digit-sum loop
exam-2023-fall-ex13-q1 Κάντο όπως ο Βιετά ★★☆ - 2 Viete product in a loop, sqrt
exam-2023-fall-ex13-q2 Αλλαγή Τέρματος ★☆☆ - 3 stdin grid of given size into heap array, rotate 180
exam-2023-fall-ex13-q3 Πρωτάθλημα ★★★ - 3 aggregate teams from file into structs, sort with tie-break
exam-2023-fall-ex13-q4 Τυχεροί Αριθμοί ★★☆ - 2 sum of two cubes: loop with cube-root check
exam-2023-fall-ex14-q1 Ορεκτικό ★☆☆ - 2 stdin, emoji at both ends of each line
exam-2023-fall-ex14-q2 Μένοντας στις Σωστές Θερμίδες ★★☆ - 2 sort argv calories, greedy count
exam-2023-fall-ex14-q3 Μετρήσεις Θερμοκρασίας ★★☆ - 3 store file measurements dynamically, sort by distance to mean
exam-2023-fall-ex14-q4 Τρόποι να Φάμε Παϊδάκια ★★★ - 4 count eating orders: dynamic programming / recursion
exam-2023-fall-ex15-q1 Πλαγιαστά Γράμματα ★☆☆ - 2 stdin, italic letters between asterisks
exam-2023-fall-ex15-q2 Τυπώνοντας τον Πίνακα ASCII ★★☆ - 2 ASCII table in columns, nested loops
exam-2023-fall-ex15-q3 Ταξινομώντας τα Άλματα ★★★ - 3 parse JSON-like file into structs, sort descending
exam-2023-fall-ex15-q4 Δυνατότητες ★★☆ - 2 dictionary file words matched to phone digits

Verified:

  • make check passes.
  • Running gen-exercises.py a second time changes nothing.
  • The lint rule fails both ways: a slide question with a level, and an exam question without one.
  • A local build with the same Jekyll image as CI, after site-prep.py:
    • all 108 links resolve and the four anchors exist
    • the page title is «Θέματα εξετάσεων»
    • previous/next work, and the first question of a level has no previous link

CI fix (separate commit): the Check PDFs step now runs apt-get update before installing poppler-utils. The runner's stale package index made that install 404 twice, a failure unrelated to this change.

Opened from socrates.

Every exam question gets a `level` from 1 (short question) to 4 (the
hardest θέμα), using the rubric now in STYLE.md, and lint requires it on
exam questions only. gen-exercises.py writes questions/exam-questions.md,
the 108 questions grouped by level, each linking to its page on the site,
and _data/exams.yml, which gives every exam question page a level badge
and previous/next links within its level. The home page and the question
bank link to the new page.
@ethan42 ethan42 closed this Oct 9, 2026
@ethan42 ethan42 reopened this Oct 9, 2026
The runner image shipped an index pointing at a superseded poppler
version, so the install 404ed and the PDF check failed.
@ethan42
ethan42 merged commit f506c9f into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant