r/OfferEngineering • • 3h ago

Coding Question Grammarly(Superhuman) SWE OA

0 Upvotes

Question 1 — Binary Search: Find the First Index

The first coding question asked me to implement binary search to find the first index satisfying a given condition. Unlike a basic binary search that returns any matching index, this variation focused on identifying the first qualifying position. The main challenge was implementing the search boundaries correctly so that the algorithm returned the appropriate index rather than an arbitrary match.

Question 2 — Interval List Intersections (LC 986 Variant)

The second question was a variation of LeetCode 986 — Interval List Intersections. The standard problem involves two lists of sorted, non-overlapping intervals. The goal is to identify the intersections between intervals from the two lists.

For example:

Input:
firstList = [[2, 6], [10, 14], [18, 22]]
secondList = [[4, 12], [16, 20]]

Output:
[[4, 6], [10, 12], [18, 20]]

Each resulting interval represents a range shared by an interval from the first list and an interval from the second list. The interview question was based on this problem but included a variation of the standard version.

Want to practice more real interview coding questions?

You can practice real interview coding questions at here.

Preparing for your next interview?

Chill Interview tracks recent interview experiences and recurring question patterns across top companies at here.


r/OfferEngineering • • 21h ago

Interview Experience AWS SDE II Interview — Did I Just Win the LeetCode Lottery?

1 Upvotes

This interview experience was originally shared on Chill Interview

Interview Summary

My AWS SDE II process was a phone screen followed by a four-round onsite: two coding rounds, one system design round and a Bar Raiser. The questions were variants of connected components, LRU Cache with TTL, Task Scheduler and Optimal Account Balancing, plus a design for real-time game statistics that went deep on Redis. Almost every round included a live dry run and complexity analysis. The Bar Raiser asked for more than one approach to the same problem.

Phone Screen — Graph Connected Components

I got a graph problem similar to Number of Connected Components in an Undirected Graph (LeetCode 323). You have a graph of n nodes labeled from 0 to n - 1. You are given an integer n and an array edges where edges[i] = [ai, bi] indicates that there is an edge between ai and bi in the graph. Return the number of connected components in the graph.

Onsite Round 1 — Coding: LRU Cache with TTL

Design and implement something similar to LRU Cache (LeetCode 146). The interviewer explicitly asked me to build it with a HashMap and a doubly linked list, and then to dry run it live. The follow-up asked how I'd change the design if entries had a TTL (time-to-live). The round ended with time and space complexity analysis.

Want to learn more questions / follow-ups asked in this interview?

I've put up the full version at here.

Interviewed recently?

Your interview experience could be incredibly valuable to others preparing for their next opportunity. Share your experience and help the community at here.


r/OfferEngineering • • 5h ago

Coding Question [Hard] Google Coding Screening Problem - Expedition Sample Kit Assembly

2 Upvotes

Problem Description

An expedition laboratory has 14 samples identified by integer codes in sample_codes. To prepare one complete kit, the laboratory must divide all samples into exactly four packs of three samples and exactly one reserve pair.

Each three-sample pack must contain either three identical codes or three consecutive codes, such as [4, 5, 6]. The reserve pair must contain two identical codes, and every individual sample must belong to exactly one group.

The order of the samples does not matter, and a code may appear any number of times among the 14 samples. Consecutive codes do not wrap from 9 to 1; return true if a complete kit can be assembled, or false otherwise.

Constraints:

  • sample_codes.length = 14.
  • 1 ≤ sample_codes[i] ≤ 9.

Example:

Input:
sample_codes = [2, 2, 3, 3, 4, 4, 6, 6, 6, 7, 7, 7, 9, 9]

Output:
true

Explanation:
Use [2, 3, 4] twice, [6, 6, 6], and [7, 7, 7] as the four packs. The two samples with code 9 form the reserve pair.

Want to practice more real interview coding questions?

You can practice real interview coding questions at here.

Preparing for your next interview?

Chill Interview tracks recent interview experiences and recurring question patterns across top companies at here.


r/OfferEngineering • • 6h ago

Interview Experience Snap Senior MLE Interview — I Thought I Did Well. But bombed it

3 Upvotes

This interview experience was originally shared on Chill Interview

Interview Summary

The onsite interview process consisted of four rounds covering coding, ML fundamentals, applied machine learning, and ML system design. Each round started with approximately 10 minutes of values-related and project questions, including how I use AI in my daily work and how I handle competing priorities.

Round 1 — Coding: Print Employee Organization Chart (DFS)

The coding interview involved a tree traversal problem called Print Employee Org Chart. I was given a collection of employee records and asked to generate a hierarchical text representation of the company's organizational structure. Each employee is represented by three strings:

  • employee_id: A unique identifier for the employee.
  • manager_id: The identifier of the employee's direct manager.
  • name: The employee's name.

The company has exactly one CEO, identified by the special condition: employee_id == manager_id. Every other employee reports to exactly one manager. The input records can appear in any order, so the implementation cannot assume that managers are listed before their direct reports.

Implement a function that generates an organization chart as a single formatted string. The output must satisfy the following requirements

Round 2 — Machine Learning Fundamentals: Model Lifecycle and Evaluation

The second round focused on machine learning fundamentals, with the interviewer asking detailed questions based on my previous projects. Rather than presenting isolated theoretical questions, the interviewer used my project experience as the starting point and then explored the underlying ML concepts.

Want to learn more questions / follow-ups asked in this interview?

I've put up the full version at here.

Interviewed recently?

Your interview experience could be incredibly valuable to others preparing for their next opportunity. Share your experience and help the community at here.


r/OfferEngineering • • 8h ago

doordash nyc swe culture

2 Upvotes

So i recently got an offer for doordash swe in nyc and ive heard many bad stories about doordash and the culture there being bad and all that. But i don’t really take that to heart because i know with every big company, the wlb and how good/bad the teams are is dependent on the individual team. For context im in the marketplace org and dont know my team yet, but for those who have worked there how’s the culture there exactly?

How’re the managers and general engineering folk there?

Also whats the pay progression like at doordash as well? Because from what I know everyone starts with the same pay and moves up, so please im very interested in knowing more about this and any other information people can share like rate of layoffs and bureaucracy

Thanks!


r/OfferEngineering • • 19h ago

Coding Question Microsoft Staff SWE OA

4 Upvotes

Problem 1 — Maximum Money on a Prime-Jump Journey

A traveler goes through a row of cities given as an integer array. Each value is the money earned in that city (positive) or spent there (negative). The trip starts at city 0 and has to end at city n - 1. From any city, the traveler can either move to the next city or jump ahead p cities, where p is any prime number whose last digit is 3. The task is to return the most money the traveler can have at the end of the trip.

cities = [0, -40, 70, -300, 60, -200, -90, 30]
output = 50

In this example, the array is short enough that 3 is the only usable prime ending in 3, so every move is either +1 or +3. The best route starts at city 0 and steps to city 1 (total −40). From there it jumps three cities to city 4 (−40 + 60 = 20) and jumps three more to city 7 (20 + 30 = 50).

The function to implement was optimalJourneyTotal(int cities[n]), which returns an int. The constraints were:

  • 1 <= n <= 10^4 and -10^4 <= cities[i] <= 10^4
  • cities[0] = 0

Problem 2 — House Robber IV (LeetCode 2560)

There are several consecutive houses along a street, each of which has some money inside. There is also a robber, who wants to steal money from the homes, but he refuses to steal from adjacent homes.

The capability of the robber is the maximum amount of money he steals from one house of all the houses he robbed. You are given an integer array nums representing how much money is stashed in each house. More formally, the ith house from the left has nums[i] dollars.

You are also given an integer k, representing the minimum number of houses the robber will steal from. It is always possible to steal at least k houses. Return the minimum capability of the robber out of all the possible ways to steal at least k houses.

Example 1:

Input: nums = [2,3,5,9], k = 2
Output: 5
Explanation: 
There are three ways to rob at least 2 houses:
- Rob the houses at indices 0 and 2. Capability is max(nums[0], nums[2]) = 5.
- Rob the houses at indices 0 and 3. Capability is max(nums[0], nums[3]) = 9.
- Rob the houses at indices 1 and 3. Capability is max(nums[1], nums[3]) = 9.
Therefore, we return min(5, 9, 9) = 5.

Want to practice more real interview coding questions?

You can practice real interview coding questions at here.

Preparing for your next interview?

Chill Interview tracks recent interview experiences and recurring question patterns across top companies at here.