About the Course

Basic Algorithms
≈ 3 min read

What we study in the course

Algorithms are step-by-step methods for solving problems and working with data. They help you not only write a correct program, but also make it fast enough in execution time and efficient enough in memory usage.

The course moves from basic principles to more advanced techniques: complexity analysis, arrays and strings, searching and sorting, stacks and queues, linked lists, trees, graphs, recursion, greedy algorithms, and dynamic programming.

To reinforce practical skills, the course uses different types of exercises:

  • Multiple-choice test;
  • Complete an algorithm fragment;
  • Put solution steps in the correct order;
  • Match terms with definitions;
  • Enter an exact answer;
  • Select the incorrect line;
  • Implement a solution yourself.

Different practice formats help you remember more than algorithm names. They also teach you to understand behavior: what data is stored in a structure, how the state changes at each step, and where the final complexity comes from.

Course roadmap

The topics are ordered so that new approaches build on ideas you already know:

  • Core principles. What an algorithm is, how to estimate complexity, and how to work with arrays, strings, searching, and sorting.
  • Data structures. Stacks, queues, linked lists, trees, hash-based structures, and graphs.
  • Algorithmic techniques. Recursion, two pointers, sliding window, greedy solutions, traversals, dynamic programming, and other patterns.

If a complex solution stops being clear, it helps to return to a small example and literally trace the algorithm by hand: which values change, what is stored in the data structure, and why the next step is valid.

How we explain algorithms

Examples stay small: one problem — one main idea. That makes it easier to see the algorithm itself without getting lost in unnecessary code.

int left = 0;
int right = numbers.length - 1;

while (left < right) {
    int sum = numbers[left] + numbers[right];

    if (sum == target) {
        return true;
    }

    if (sum < target) {
        left++;
    } else {
        right--;
    }
}

The important thing here is not simply to memorize how the two pointers move. You should understand the condition that makes this approach work: the array is sorted, so comparing the sum with target tells us which pointer can safely be moved. The same principle — finding a property that lets you discard part of the search space — will appear in many other algorithms as well.

The main goal is to explain the solution in your own words. If you can describe the idea, justify why it is correct, and estimate its complexity, you have truly understood the topic.