Skip to content
Tech Interview Prep

Real Interview Questions for the Backend Software Engineer at Yandex

New

Practice MCQs

Answers count toward the Backend Software Engineer and overall leaderboards; your latest answer to each question is the one that counts.

17 questions · Flow follows Relevance until this set has a learning order.

MCQ-1A backend job must move all zeros in `a = [0, 1, 0, 3, 12]` to the end in place, preserving the order of the nonzero values, using O(n) time and O(1) extra space. What final contents should the original array hold?
Difficulty: Easy
MCQ-2A backend service must sort 1,000,000 log records by timestamp, preserving input order for equal timestamps and guaranteeing worst-case latency, with an auxiliary array of the same size available. Timestamps span a wide range with no small bound. Which sorting approach fits these constraints?
Difficulty: Medium
MCQ-3A queue worker receives a malformed job that always throws, with a 30-second visibility timeout and `maxReceiveCount` set to 3. The worker receives the job for the third time and it fails again. What happens to the message next?
Difficulty: Medium
MCQ-4A service stores sorted timestamps in `a = [10, 20, 20, 20, 30, 40]` and runs a lower-bound search with `lo = 0`, `hi = len(a)`, and `while lo < hi` for the first element at least `25`. What index does that search return?
Difficulty: Easy
MCQ-5A BST built by inserting `10`, `20`, then `30` has root `10` with a right chain and height 3. The team must restore balance with one rotation while preserving inorder sequence `10, 20, 30`. Which rotation does that?
Difficulty: Easy
MCQ-6A Go service streams events through a channel with capacity `100`. The producer emits 10000 events per second while the consumer processes 1000 per second, and the producer uses a nonblocking send that drops events when the channel is full. Which change applies backpressure without dropping events?
Difficulty: Easy
MCQ-7A backend job scans `a = [4, 2, -4, 3, 4]` for a contiguous subarray summing to `7` and must report one. Negative values are present in the array. Which approach finds a valid subarray for this array?
Difficulty: Medium
MCQ-8A service stores 100000 session keys in a chaining hash table with 1024 buckets and a good hash function. Profiling shows one bucket holds 80000 keys while most buckets hold fewer than ten, and p99 lookup has risen sharply. What best explains the slowdown?
Difficulty: Easy
MCQ-9A mutable array `s = ['#', 'a', '#', 'b', '#']` must have every `#` erased in place with two pointers and no extra array, returning the new length. Where do the surviving characters end up after the scan finishes?
Difficulty: Easy
MCQ-10A backend service compresses `['a','a','a','a','a','a','a','a','a','a','a','a','b','c','c','c']` in place, writing each run as the character followed by its count and returning the new length. What occupies the first slots and what length is returned?
Difficulty: Easy
MCQ-11A backend service receives `[10,11,12,1,2,100,2]` and must return the longest consecutive sequence length without sorting, in O(n) average time. Which approach fits this scenario?
Difficulty: Medium
MCQ-12Your Friday release depends on an external payment service whose vendor confirmed a three-day delay that cannot be accelerated, and your manager, who owns client updates and is available today, has not yet updated the client. The Friday contract requires automated reconciliation and full reporting. What is the best way to handle the deadline and expectations?
Difficulty: Medium
MCQ-13A checkout service's p99 rose from 80ms to 900ms minutes after a deploy, rollback returned it to 90ms within minutes, and a database index added later held p99 at 85ms during replayed peak traffic. The candidate is summarizing what each step proved. Which conclusion correctly attributes the immediate and sustained recovery?
Difficulty: Easy
MCQ-14A Python 3 worker passes a list `queue` and an integer `retries` to `drain(queue, retries)`, which appends one job to `queue` and reassigns `retries` locally. After the call returns, the worker logs both values. What does the worker observe?
Difficulty: Easy
MCQ-15A C++ service loads a `std::vector<int>` of two million readings and calls `summarize(v)` repeatedly. `summarize` only reads the readings to compute a total and never modifies them, but its current signature takes the vector by value. Which signature should replace it?
Difficulty: Easy
MCQ-16A candidate's API middleware retried failed upstream calls without a deadline, so a slow dependency held request threads and p99 rose from 80ms to 900ms during a partial outage. The candidate says they added a 200ms timeout, capped retries at one, and added a circuit breaker in the middleware they owned. Which account best explains where, what, and how they fixed it?
Difficulty: Easy
MCQ-17A Go service originally built `items := []string{}` and returned it as JSON. A refactor switches to `var items []string` and appends only when database rows exist. For a query with no rows, what does the client receive?
Difficulty: Easy

Curated: · Written: · Reviewed: