Algorithm collection & learning platform
266 high-school algorithms, explained, verified — and now online.
The complete collection of high-school algorithms in C++, organised by curriculum — now with an online platform where you can read, run and track every program with a free account.
Online platform
Browse, run and track all 266 algorithms online — free account included.
n = 221 √n ≈ 14.9
- 39
- 525
- 749
- 981
- 11121
- 13169
221 = 13 · 17 → NO
- 266algorithms
- 27chapters
- 4high-school grades
How it works
266 algorithms, explained and verified (Algoritmi elementari în C++)
The collection
Every algorithm of the Romanian high-school computer science curriculum, written in C++ and organised by grade: 87 in grade 9, 67 in grade 10, 62 in grade 11 and 50 in grade 12.
27 chapters
Digits, divisibility, number bases, arrays, sorting, files, recursion, divide and conquer, backtracking, greedy, dynamic programming, graphs, trees, big numbers and exam practice.
Explained
Every file starts with the idea behind the algorithm, its complexity and an example of input and output, before a single line of code.
Verified
A script compiles each of the 266 programs and checks that it prints exactly the output from its example.
Online platform
The new platform lets you browse every algorithm, run the real C++ code with your own input, track what you have learned and keep notes in your own account.
About the project
Every program opens with an explanation of the idea, its complexity and an input/output example. The whole collection is verified automatically: each program compiles and produces the output from its example.
The new online platform lets you search all 266 algorithms, run them with a real C++ compiler, check them against their examples, and keep your progress, favourites and notes in a free account.
Run real C++ in your browser
Every algorithm page has an editor with the original code and its example input. Press Run and the code is compiled with g++ (C++17) on a real compiler; the result is checked against the expected output.
Track what you've learned
Mark algorithms as learning or learned, star favourites, write notes and keep a daily streak. Without an account progress stays in your browser; with one it follows you everywhere.
Interactive demo
Primality test, step by step
Type a number and watch the algorithm check divisors only up to the square root.
Press Check or pick an example. Only odd d are tested, while d · d ≤ n.
?
- Tested
- 0
- √n
- 9
- Last d
- –
if (n < 2) prime = false;
else if (n % 2 == 0) prime = (n == 2);
else for (long long d = 3; d * d <= n; d = d + 2)
if (n % d == 0) { prime = false; break; }
cout << (prime ? "YES" : "NO");
In-browser demo with simulated data. The real app does much more.
Features
Explained in the header
The idea, complexity and an input/output example right at the top of every file.
Verified automatically
A script compiles every program and checks the output from its example.
Follows the curriculum
Organised by grade and chapter, from the digits of a number to graphs and dynamic programming.
Exam preparation
A whole chapter of baccalaureate-style problems (subject III).
Run it online
Real g++ compilation and execution from the platform, checked against each example.
Your progress, saved
A free account keeps your learned algorithms, favourites, notes and streak.
What it covers
- Grade 9
- Digits, divisibility, number bases, arrays, sorting and searching, the sieve of Eratosthenes, text files.
- Grade 10
- Functions, matrices, strings, structs, recursion, divide and conquer.
- Grade 11
- Backtracking, greedy, dynamic programming, lists, stacks, queues, graphs and trees.
- Grade 12
- Big numbers, Lee and flood fill, maths for programming, advanced techniques, STL and exam revision.
How to use it
- Open the platform and search for an algorithm, or browse by grade and chapter.
- Read the explanation, then press Run to compile and execute it with the example input.
- Create a free account to keep your progress, favourites and notes.
Questions about Elementary Algorithms in C++
Do I need to install anything?
No. The platform runs in your browser and compiles code on a real C++ compiler. To work offline, clone the repository and compile with g++ -std=c++17.
Is the account free?
Yes. It only stores your name, e-mail, progress and notes, and you can export or delete everything at any time.
What language are the algorithms in?
The code is standard C++17; explanations and comments are in Romanian, following the Romanian high-school curriculum, with English titles and summaries on the platform.
Contact
Got a project in mind?
Let's talk.
Tell me briefly what you want to build. I'll reply with a concrete proposal: what goes into the first version, how long it takes and what the steps look like.
