Guide · Example tasks

Example Tasks – a Guide by Topic

Here are example tasks with solutions in C, C++, Java and Python, arranged by topic in the order they are learned: from data and operators, through branching and loops, to arrays, functions and algorithms.

The examples are suitable for practice after a lesson, for preparing for tests and as an introduction to competitions.

  • Primary and secondary school
  • C, C++, Java, Python
  • Tasks with solutions
For teachers: for one lesson choose 2–3 short examples, one task for independent work and one task with a solution for homework.

Some lessons linked below are available only in Serbian for now. They are marked (SR).

1 Basic examples

The first tasks in the order they are learned: data and operators, branching, loops, arrays and matrices, sorting, strings, functions, vectors and maps. The order and tips for working are given in the guide to basic examples.

2 Algorithm examples

Once you master the basic examples: mathematical algorithms, complexity, recursion, combinatorics and backtracking. More details are in the guide to algorithm examples.

3 Object-oriented programming

Classes and objects through tasks in Java: from the first classes to inheritance and interfaces. The order is given in the guide to object-oriented programming examples.

4 Checking knowledge: tests

Tests by topic: groups of tasks in PDF, a practice test with solutions and a quiz. The order is given in the guide to tests.

5 More tasks

Once you master the basic examples.