Yandex Interview Prep (SWE / Intern)

Yandex runs the most algorithm-dense loop on this site. Rather than one coding round, candidates report several sequential algorithm sections with roughly two problems in each, and the sections are the filter. Team matching happens afterwards and is treated as fit rather than a bar.

The format detail that catches people: interviewers are reported to use a plain text editor with no compiler. You trace execution by hand, state the asymptotics out loud, and find your own bugs. There is no test run to hide behind.


Interview Process

Stage Duration Focus
Recruiter Screen ~30 min Background, track, logistics
Online Assessment up to ~5 hrs Interns and some tracks. Contest-style set of several problems
Algorithm Section 1 ~60 min ~2 problems. Data structures and complexity
Algorithm Section 2 ~60 min ~2 more problems with harder follow-ups
Coding and Language Section ~60 min Language specifics, code quality, unit testing
Team Matching varies Unstructured conversations with teams

Five to nine rounds over roughly three to five weeks, and six to eight coding problems in total across the sections.

The expected rhythm in each problem is reported consistently: explain the approach aloud, state the complexity, write the code, then fix the bug the interviewer points at. Language trivia appears alongside the algorithms, such as how passing a vector by reference behaves in C++.

The corporate picture changed in 2024. The Dutch parent company sold its Russian assets to an investor consortium in July 2024 and rebranded as Nebius Group, and the Yandex brand inside Russia is separately owned. Which entity you would actually be joining is worth establishing before you interview.


What Yandex Actually Tests

Derived from 130 reported Yandex-tagged problems. Difficulty mix:

Difficulty Count Share
Easy 51 39%
Medium 69 53%
Hard 10 8%

The list skews Easy and Medium. Speed and clean code matter more here than exotic algorithms.

Where those problems fall by pattern:

Rank Pattern Problems Share of list
1 Sliding Window & Two Pointers 27 21%
2 Arrays & Hashing 25 19%
3 Trees 12 9%
4 Binary Search 11 8%
5 Dynamic Programming 10 8%
6 Design (Coding) 10 8%
7 Strings 8 6%
8 Stack & Monotonic Stack 6 5%
9 Heap / Priority Queue 5 4%
10 Intervals, Greedy & Sorting 4 3%

Yandex Signature Problems

These rank high on Yandex’s list but are reported by few other companies — the questions that are distinctively theirs rather than generic interview classics. The last column is how many of the 142 companies on this site report each one.

# Problem Pattern Difficulty Also asked at Link
1 Longest Subarray of 1’s After Deleting One Element Sliding Window + DP Medium 7 of 142 LeetCode →
2 Maximize Distance to Closest Person Array Medium 9 of 142 Solve →
3 Find K Closest Elements Sliding Window + Heap Medium 17 of 142 Solve →
4 Line Reflection Math + Hash Table Medium 2 of 142 LeetCode →
5 Longest Strictly Increasing or Strictly Decreasing Subarray Array Easy 6 of 142 LeetCode →
6 One Edit Distance Two Pointers Medium 7 of 142 Solve →
7 Find All Anagrams in a String Sliding Window Medium 12 of 142 Solve →
8 Permutation in String Sliding Window + Two Pointers Medium 15 of 142 Solve →
9 Design an ATM Machine Design + Greedy Medium 2 of 142 LeetCode →
10 Find the Prefix Common Array of Two Arrays Bit Manipulation Medium 6 of 142 LeetCode →
11 Find Duplicate Subtrees Binary Tree + DFS Medium 9 of 142 LeetCode →
12 Interval List Intersections Sweep Line + Two Pointers Medium 11 of 142 LeetCode →
13 Binary Tree Right Side View Binary Tree + BFS Medium 14 of 142 Solve →
14 Longest Substring with At Most K Distinct Characters Sliding Window Medium 11 of 142 Solve →

If you are short on time, these carry more Yandex-specific signal per hour than the universal top-100 lists.


Reported in the Last Six Months

The recency-filtered slice of Yandex’s list, ranked by how often each was reported. Expect heavy overlap with the all-time classics — that overlap is the point, it means these stay in rotation.

# Problem Pattern Difficulty Link
1 Longest Subarray of 1’s After Deleting One Element Sliding Window + DP Medium LeetCode →
2 Maximize Distance to Closest Person Array Medium Solve →
3 Summary Ranges Array Easy LeetCode →
4 Find K Closest Elements Sliding Window + Heap Medium Solve →
5 Longest Substring Without Repeating Characters Sliding Window Medium Solve →
6 Merge Intervals Quicksort Medium Solve →
7 Subarray Sum Equals K Prefix Sum Medium Solve →
8 Interval List Intersections Sweep Line + Two Pointers Medium LeetCode →
9 Longest Palindromic Substring Manacher + Two Pointers Medium Solve →
10 Binary Tree Right Side View Binary Tree + BFS Medium Solve →
11 Find Duplicate Subtrees Binary Tree + DFS Medium LeetCode →
12 Line Reflection Math + Hash Table Medium LeetCode →
13 Longest Strictly Increasing or Strictly Decreasing Subarray Array Easy LeetCode →
14 Longest Substring with At Most K Distinct Characters Sliding Window Medium Solve →
15 Number of Islands Union-Find + BFS Medium Solve →

System Design (HLD) Problems Asked at Yandex

# Problem Difficulty Link
1 Search Autocomplete Intermediate Read →
2 Web Crawler Advanced Read →
3 Ad Serving System Advanced Read →
4 Nearby Service (Maps and Taxi) Advanced Read →
5 News Aggregator Intermediate Read →
6 Distributed Cache Advanced Read →
7 Key Value Store Advanced Read →

LLD / Machine Coding Problems Asked at Yandex

Expect to produce working, readable code with clear class boundaries.

# Problem Difficulty Link
1 Multilevel Cache Intermediate Read →
2 Task Scheduler Advanced Read →
3 Queue Management Intermediate Read →

DSA Problems Asked at Yandex

78 problems across 12 pattern groups. Each group is allocated in proportion to its real share of Yandex’s tagged list, then filled with the highest-frequency problems in that group — so the weight here matches the distribution above rather than burying graph and tree work under the usual array classics.

Sliding Window & Two Pointers

Linear-time scans over arrays and strings. High volume, low variance — these should be automatic. Showing the top 14 of 21 on the list.

# Problem Pattern Difficulty Link
1 Longest Substring Without Repeating Characters Sliding Window Medium Solve →
2 Find All Anagrams in a String Sliding Window Medium Solve →
3 Move Zeroes Two Pointers Easy Solve →
4 One Edit Distance Two Pointers Medium Solve →
5 Permutation in String Sliding Window + Two Pointers Medium Solve →
6 String Compression Two Pointers Medium Solve →
7 Valid Palindrome Two Pointers Easy Solve →
8 Valid Palindrome II Greedy + Two Pointers Easy Solve →
9 Interval List Intersections Sweep Line + Two Pointers Medium LeetCode →
10 Merge Sorted Array Two Pointers Easy Solve →
11 Squares of a Sorted Array Two Pointers Easy Solve →
12 Container With Most Water Greedy + Two Pointers Medium Solve →
13 Longest Substring with At Most K Distinct Characters Sliding Window Medium Solve →
14 Remove Element Two Pointers Easy Solve →

Arrays & Hashing

Prefix sums, counting, and grid walks. The warm-up round, and the one people get careless on. Showing the top 14 of 15 on the list.

# Problem Pattern Difficulty Link
15 Maximize Distance to Closest Person Array Medium Solve →
16 Summary Ranges Array Easy LeetCode →
17 Line Reflection Math + Hash Table Medium LeetCode →
18 Longest Strictly Increasing or Strictly Decreasing Subarray Array Easy LeetCode →
19 Subarray Sum Equals K Prefix Sum Medium Solve →
20 Two Sum Hash Table + Array Easy Solve →
21 Count Substrings Without Repeating Character Implementation Medium LeetCode →
22 Product of Array Except Self Prefix Sum Medium Solve →
23 Allow One Function Call Implementation Easy LeetCode →
24 Function Composition Implementation Easy LeetCode →
25 Longest Continuous Increasing Subsequence Array Easy LeetCode →
26 Matrix Diagonal Sum Matrix + Array Easy LeetCode →
27 Max Consecutive Ones Array Easy Solve →
28 Monotonic Array Array Easy Solve →

Trees

Recursion discipline: what you return up, what you pass down. Follow-ups usually push from recursive to iterative. All 10 on the list.

# Problem Pattern Difficulty Link
29 Binary Tree Right Side View Binary Tree + BFS Medium Solve →
30 Find Duplicate Subtrees Binary Tree + DFS Medium LeetCode →
31 Binary Tree Maximum Path Sum DP on Trees + Binary Tree Hard Solve →
32 Lowest Common Ancestor of a Binary Tree Lowest Common Ancestor + Binary Lifting Medium Solve →
33 Symmetric Tree Binary Tree + BFS Easy Solve →
34 Binary Tree Level Order Traversal Binary Tree + BFS Medium Solve →
35 Binary Tree Zigzag Level Order Traversal Binary Tree + BFS Medium Solve →
36 Lowest Common Ancestor of a Binary Search Tree Lowest Common Ancestor + Binary Lifting Medium Solve →
37 Range Sum of BST BST + Binary Tree Easy LeetCode →
38 Sliding Window Maximum Range Query + Monotonic Queue Hard Solve →

Design (Coding)

Build a data structure to a spec. Graded on API shape and the complexity of each operation, not just correctness. All 9 on the list.

# Problem Pattern Difficulty Link
39 Design an ATM Machine Design + Greedy Medium LeetCode →
40 Insert Delete GetRandom O(1) Randomized + Design Medium LeetCode →
41 Min Stack Design + Stack Medium Solve →
42 Design Hit Counter Data Stream + Queue Medium Solve →
43 LRU Cache Doubly Linked List + Design Medium Solve →
44 Number of Recent Calls Data Stream + Queue Easy Solve →
45 Design an Ordered Stream Data Stream + Design Easy LeetCode →
46 Find Median from Data Stream Data Stream + Design Hard Solve →
47 Implement Queue using Stacks Queue + Design Easy Solve →

Dynamic Programming

State definition is the whole battle. Say the recurrence out loud before you write the table. All 8 on the list.

# Problem Pattern Difficulty Link
48 Longest Subarray of 1’s After Deleting One Element Sliding Window + DP Medium LeetCode →
49 Is Subsequence Two Pointers + DP Easy Solve →
50 Trapping Rain Water Monotonic Stack + Two Pointers Hard Solve →
51 Generate Parentheses Bracket Sequences + Backtracking Medium Solve →
52 Maximum Subarray Divide and Conquer + DP Medium Solve →
53 Perfect Squares Complete Knapsack + Knapsack Problem Medium Solve →
54 Best Time to Buy and Sell Stock DP Easy Solve →
55 Longest Increasing Subsequence LIS + Binary Search Medium Solve →

Half of these are binary search on the answer, not on an array. Learn to spot the monotonic predicate. All 6 on the list.

# Problem Pattern Difficulty Link
56 Max Consecutive Ones III Sliding Window + Prefix Sum Medium Solve →
57 Median of Two Sorted Arrays Divide and Conquer + Binary Search Hard Solve →
58 Search in Rotated Sorted Array Binary Search Medium Solve →
59 Find Minimum in Rotated Sorted Array Binary Search Medium Solve →
60 Intersection of Two Arrays Binary Search + Two Pointers Easy Solve →
61 Intersection of Two Arrays II Binary Search + Two Pointers Easy LeetCode →

Stack & Monotonic Stack

Nearest-greater, parsing, and span problems. The monotonic variant is the one people miss. All 4 on the list.

# Problem Pattern Difficulty Link
62 Valid Parentheses Bracket Sequences + Stack Easy Solve →
63 Basic Calculator II Stack Medium Solve →
64 First Unique Character in a String Queue Easy Solve →
65 Simplify Path Stack Medium Solve →

Strings

Parsing, transformation, and in-place edits. Clarify the character set and whitespace rules before you start. All 4 on the list.

# Problem Pattern Difficulty Link
66 Isomorphic Strings Hash Table + String Easy Solve →
67 Group Anagrams Sorting + Hash Table Medium Solve →
68 Add Strings Simulation + Math Easy Solve →
69 Destination City Hash Table + String Easy LeetCode →

Linked List

Pointer surgery under time pressure. Draw the nodes before you write the reassignments. All 3 on the list.

# Problem Pattern Difficulty Link
70 Merge Two Sorted Lists Linked List Easy Solve →
71 Add Two Numbers Linked List Medium Solve →
72 Reverse Linked List Linked List Easy Solve →

Graphs

Traversal, connectivity, ordering, and shortest paths. The hardest bucket to fake — either you have drilled it or you have not. All 2 on the list.

# Problem Pattern Difficulty Link
73 Number of Islands Union-Find + BFS Medium Solve →
74 Reconstruct Itinerary Semi-Eulerian Graph + Eulerian Circuit Hard Solve →

Heap / Priority Queue

Top-k, streaming medians, and scheduling. Usually the difference between a passing and a timing-out solution. All 2 on the list.

# Problem Pattern Difficulty Link
75 Find K Closest Elements Sliding Window + Heap Medium Solve →
76 Merge k Sorted Lists Tournament Sort + Merge Sort Hard Solve →

Intervals, Greedy & Sorting

Sort, then make a local decision you can defend. Expect to justify why greedy is safe here. All 2 on the list.

# Problem Pattern Difficulty Link
77 Merge Intervals Quicksort Medium Solve →
78 Can Place Flowers Greedy Easy Solve →

Yandex’s Favourite Patterns (Ranked)

Rank Pattern Frequency Problems on list Start with
1 Sliding Window & Two Pointers Very High 21 (23%) Longest Substring Without Repeating Characters, Find All Anagrams in a String, Move Zeroes
2 Arrays & Hashing High 15 (17%) Maximize Distance to Closest Person, Summary Ranges, Line Reflection
3 Trees High 10 (11%) Binary Tree Right Side View, Find Duplicate Subtrees, Binary Tree Maximum Path Sum
4 Design (Coding) Medium-High 9 (10%) Design an ATM Machine, Insert Delete GetRandom O(1), Min Stack
5 Dynamic Programming Medium-High 8 (9%) Longest Subarray of 1’s After Deleting One Element, Is Subsequence, Trapping Rain Water
6 Binary Search Medium-High 6 (7%) Max Consecutive Ones III, Median of Two Sorted Arrays, Search in Rotated Sorted Array
7 Stack & Monotonic Stack Medium 4 (4%) Valid Parentheses, Basic Calculator II, First Unique Character in a String
8 Strings Medium 4 (4%) Isomorphic Strings, Group Anagrams, Add Strings
9 Linked List Medium 3 (3%) Merge Two Sorted Lists, Add Two Numbers, Reverse Linked List
10 Graphs Medium 2 (2%) Number of Islands, Reconstruct Itinerary

How to read this: the top three rows are where your preparation hours should go. A candidate fluent in Sliding Window & Two Pointers, Arrays & Hashing, Trees covers the bulk of what Yandex actually asks. The rest is insurance for the one round that goes somewhere unexpected.


Behavioural Round

# Question
1 Why Yandex rather than a Western technology employer?
2 Which product would you change, and how?
3 Describe a time you optimised something that was already fast enough.
4 How do you handle a long gap between interview stages?
5 Which team do you want, and why that team specifically?
6 Tell me about the hardest algorithmic problem you have solved in production.

14-Day Prep Plan

Built from the pattern ranking above, so the heaviest topics get the most time.

Day Focus Problems
1 Sliding Window & Two Pointers (part 1) Longest Substring Without Repeating Characters, Find All Anagrams in a String, Move Zeroes
2 Sliding Window & Two Pointers (part 2) One Edit Distance, Permutation in String, String Compression
3 Arrays & Hashing (part 1) Maximize Distance to Closest Person, Summary Ranges, Line Reflection
4 Arrays & Hashing (part 2) Longest Strictly Increasing or Strictly Decreasing Subarray, Subarray Sum Equals K, Two Sum
5 Trees (part 1) Binary Tree Right Side View, Find Duplicate Subtrees, Binary Tree Maximum Path Sum
6 Trees (part 2) Lowest Common Ancestor of a Binary Tree, Symmetric Tree, Binary Tree Level Order Traversal
7 Design (Coding) Design an ATM Machine, Insert Delete GetRandom O(1), Min Stack
8 Dynamic Programming Longest Subarray of 1’s After Deleting One Element, Is Subsequence, Trapping Rain Water
9 Binary Search Max Consecutive Ones III, Median of Two Sorted Arrays, Search in Rotated Sorted Array
10 Stack & Monotonic Stack Valid Parentheses, Basic Calculator II, First Unique Character in a String
11 Strings Isomorphic Strings, Group Anagrams, Add Strings
12 Mock round Two problems in 45 minutes, timed, no hints. Simulate the real round.
13 Revision Redo the problems you failed or needed a hint on.
14 Light review + rest Re-read your pattern notes. Sleep early.

Tips for Yandex Interviews

  1. Practice writing code with no compiler. Reports describe a plain text editor and manual tracing. Write a tree or graph solution on paper, then dry-run it line by line looking for your own off-by-one.
  2. Prepare for two problems per hour, not one. The sections are reported to pack two each, so pace matters as much as depth. A perfect first answer and an unstarted second is a weak section.
  3. State the complexity before you write anything. It is part of the expected rhythm rather than a closing formality, and interviewers are reported to ask for the approach aloud first.
  4. Expect the interviewer to point at a bug. Taking the hint and fixing it cleanly is part of the evaluation. Defending wrong code is the failure mode.
  5. Revise language trivia alongside algorithms. Reported questions include C++ reference and copy semantics, which is separate from the algorithmic content.
  6. Establish which entity you are interviewing with. After the 2024 restructuring the Russian business and the international company are different employers. Ask before you invest five to nine rounds.

Other Company Prep


Yandex does not publish its engineering loop, and the corporate restructuring in 2024 means older candidate reports may describe a different employer from the one hiring you. Confirm both the entity and the format with your recruiter.