yandex logo

Yandex Interviews

2 experiences6 reads13 questions0% success rate
Summary Ranges – Asked in Yandex Interview
yandex logo
Yandex
July 28, 20253 reads

Summary

This post details my approach and solution to the 'Summary Ranges' problem, which I encountered during a Yandex interview.

Full Experience

Intuition

To summarize ranges in a sorted array, we can identify segments of consecutive numbers. Whenever a gap occurs between two numbers, it marks the end of the current range

Approach

We iterate through the array while keeping track of the start of the current range using a variable s.By appending float('inf') to the list, we ensure the final range is processed without requiring additional checks after the loop

At each step, we check if nums[i] - nums[i-1] > 1, which means the consecutive sequence has ended

We then:

  • Record the range from s to nums[i-1]
  • Update s to start a new range from nums[i]

If the start and end of the range are the same, we store it as a single number. Otherwise, we use the "start->end" format

Complexity

  • Time complexity: $$O(n)$$ — We go through the list once
  • Space complexity: $$O(n)$$ — for storing the resulting list of summary strings

Interview Questions (1)

Q1
Summary Ranges
Data Structures & AlgorithmsEasy

To summarize ranges in a sorted array, we can identify segments of consecutive numbers. Whenever a gap occurs between two numbers, it marks the end of the current range. My approach involves iterating through the array while keeping track of the start of the current range using a variable s. By appending float('inf') to the list, we ensure the final range is processed without requiring additional checks after the loop. At each step, we check if nums[i] - nums[i-1] > 1, which means the consecutive sequence has ended. We then record the range from s to nums[i-1] and update s to start a new range from nums[i]. If the start and end of the range are the same, we store it as a single number. Otherwise, we use the "start->end" format.

Yandex Frontend Interview. Senior+ 5YOE (No hire)
yandex logo
Yandex
Senior+5 years
July 3, 20253 reads

Summary

I interviewed for a Senior+ Frontend role at Yandex with 5 years of experience. I was not hired primarily due to a lack of knowledge in CI/CD, deployment processes, and backend concepts, despite performing well on various technical and algorithmic challenges.

Full Experience

Platform, Algorightms:

  1. Implement Array.groupby
  2. Given 2 arrays of intervals find their intersections
  3. Implement Promise.all, Promise.any
  4. Implement lodash.debounce (something similar)
  5. Implement lodash.get
  6. Does string s exist in subsequence of k
  7. Simple hashmap. Messages apear in non consecutive order (let's assume via websockets). We need to log them consecutevly when they appear. Eg messages appear like so 1,3,2,4. First we log 1. Then remember 3. Then log 2 and 3 when we get 2. Then log 4.

Finals:

  1. Why we use SSR?
  2. CI\CD. Have you ever worked with?
  3. Testing. Why we use it? What types of testing did you use?
  4. Cases with optimizing your codebase?
  5. Hardest project\task you ever worked with. How did you deal with that?

Vertict: No hire.

Reason: Don't know CI\CD, Deploy, and backend

Interview Questions (12)

Q1
Implement Array.groupby
Data Structures & Algorithms

Implement the Array.groupby method.

Q2
Find Intersections of Two Interval Arrays
Data Structures & AlgorithmsMedium

Given 2 arrays of intervals, find their intersections.

Q3
Implement Promise.all and Promise.any
Data Structures & AlgorithmsMedium

Implement JavaScript's Promise.all and Promise.any methods.

Q4
Implement lodash.debounce
Data Structures & AlgorithmsMedium

Implement a debounce function similar to lodash.debounce.

Q5
Implement lodash.get
Data Structures & AlgorithmsEasy

Implement a function similar to lodash.get for safely accessing nested object properties.

Q6
Check if String S is a Subsequence of K
Data Structures & AlgorithmsEasy

Given two strings, s and k, determine if s exists as a subsequence of k.

Q7
Log Consecutive Messages from Out-of-Order Stream
Data Structures & AlgorithmsMedium

Implement a system to log messages consecutively, even if they appear in a non-consecutive order (e.g., via websockets). For example, if messages appear as 1,3,2,4: First, log 1. Then, remember 3. When 2 arrives, log 2 and then 3. Finally, log 4.

Q8
Why use Server-Side Rendering (SSR)?
System Design

Explain the reasons and benefits of using Server-Side Rendering (SSR).

Q9
Experience with CI/CD
System Design

Discuss your experience with Continuous Integration and Continuous Deployment (CI/CD).

Q10
Importance and Types of Testing
System Design

Explain why testing is important and describe the types of testing you have experience with.

Q11
Codebase Optimization Strategies
System Design

Describe scenarios where you optimized a codebase and the approaches you took.

Q12
Hardest Project/Task and Resolution
Behavioral

Describe the hardest project or task you've worked on and how you approached and resolved it.

Have a Yandex Interview Experience to Share?

Help other candidates by sharing your interview experience. Your insights could make the difference for someone preparing for their dream job at Yandex.