
Real Interview Questions for the Backend Software Engineer at Yandex
NewPractice MCQs
Answers count toward the Backend Software Engineer and overall leaderboards; your latest answer to each question is the one that counts.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
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?
Answer to see the discussion.
Curated: · Written: · Reviewed: