Premium course
Python
25 hours

Python interview: the algorithm round

For those with an interview with algorithm problems coming up. The 11 techniques behind most problems of the round: how to recognise the right one from the statement, solve a problem in half an hour and check the code in your head on your own examples.

  • 11 techniques on well-known interview problems: two sum, brackets, an LRU cache, a maze, a staircase
  • Complexity in Python: which lines quietly make a solution quadratic
  • A preparation plan for your deadline: a week, two weeks or a month
15 lessons
Certificate on completion

The course is part of premium — together with the other advanced courses, the AI assistant and certificates.

solution.py
An example from the course

Find the length of the longest run of consecutive ones.

Technique: one pass
# [1, 0, 1, 1, 0] -> 2
# [] -> 0
# [0, 1, 1] -> 2 run at the end
def longest_ones(nums):
best = count = 0
for x in nums:
count = count + 1 if x else 0
best = max(best, count)
return best
# O(n) time, O(1) memory

What changes after the course

Now
After the course
I read the problem and start coding right away, and remember the empty list only when the interviewer asks
You start with 3–4 examples, edge cases included, and only then write the solution
Asked about complexity, I say "well, linear" and can't explain why
You state the complexity of your solution and point to the line that determines it
Without running the code I'm not sure it works at all
You trace the solution in your head on your own examples and find the bug before submitting
Every problem looks new, and the solution doesn't come within the half hour
You spot a familiar technique in the statement, such as a sliding window or two pointers, and know where to start
When the solution doesn't come, I go quiet and turn ideas over in my head
You start with a simple solution out loud and know how to get from it to a fast one

Course program

Each lesson is short theory on live examples plus practice in the trainer with auto-checking. Nothing to install: Python runs right in the browser.

How the learning works

01

Read a lesson with live examples

Theory without filler: every code example can be run and edited right in the browser, with the result shown instantly.

02

Solve tasks in the trainer

You write code and the answer is checked automatically against a set of tests. No local environment setup.

03

Stuck — the AI mentor helps

The built-in assistant points out where the error is and nudges you toward the solution without giving it away.

Who is this course for

An interview with algorithm problems is coming up

The interview is scheduled or about to be, and you want to walk in with a set of techniques rather than hope for a familiar problem.

You write Python but rarely solve algorithm problems

You use Python at work, but the last time you saw problems on complexity and data structures was at university.

You solve LeetCode at home but get lost in the interview

At home the solution works after the fifth run, but in the interview there is no run button and you have to check the code in your head.

You need to solve easy Python Academy trainer problems with confidence. If they are still hard, start with the free "Python Basics" course, and then return to this one.

A certificate you can verify

Complete all the lessons and get a named certificate of completion. You can add it to your resume or your LinkedIn profile.

A certificate you can verify
Your name and the course title
QR code and verification link

One premium — all courses at once

You're buying not a single course but the whole Python Academy premium: the advanced courses and every trainer feature.

  • Access to advanced Python courses
  • Unlimited hints from AI Assistant
  • Access to tasks from top company interviews
  • Access to reference solutions for tasks
  • Certificate of successful completion of Python tasks in the trainer
$ 24,90
6-month access

Secure payment by Russian card via YooKassa or by international card via Stripe. Access opens right after payment.

Frequently asked questions

Enough to solve easy Python Academy trainer problems with confidence: write a function with a loop, build a dict from a list, read a simple class with methods. Complexity and the techniques themselves are covered from scratch on interview problems.
Automatically, by the Python Academy trainer tests. The course has 17 problems with five tests each, and every test catches its own mistake: an empty list, a run at the end, meetings that touch taken for an overlap. Most problems also have a large test that rejects slow brute force. It pays to practice the way the round works: examples and a check in your head first, then the submission.
About 25 hours: 15 lessons and 17 problems. The plan in the first lesson shows how to spread them before the interview, over a week, two weeks or a month. If time is short, dynamic programming can wait.
The course covers the most frequent techniques of the round. It does not cover heaps, linked lists, backtracking or prefix sums.
Log In
You need to log in to access this course.
Log in