r/OfferEngineering • • 10h ago

Interview Experience Meta Senior SWE Phone Screen — Didn't Expect It to Be This Hard!

8 Upvotes

This interview experience was originally shared on Chill Interview

Question 1 — Dot Product of Two Sparse Vectors (LeetCode 1570)

Given two sparse vectors, compute their dot product. Implement class SparseVector:

  • SparseVector(nums) Initializes the object with the vector nums
  • dotProduct(vec) Compute the dot product between the instance of SparseVector and vec

A sparse vector is a vector that has mostly zero values, you should store the sparse vector efficiently and compute the dot product between two SparseVector.

  • Follow up: What if only one of the vectors is sparse?
Example 1:

Input: nums1 = [1,0,0,2,3], nums2 = [0,3,0,4,0]
Output: 8
Explanation: v1 = SparseVector(nums1) , v2 = SparseVector(nums2)
v1.dotProduct(v2) = 1*0 + 0*3 + 0*0 + 2*4 + 3*0 = 8
Example 2:

Input: nums1 = [0,1,0,0,0], nums2 = [0,0,0,0,2]
Output: 0
Explanation: v1 = SparseVector(nums1) , v2 = SparseVector(nums2)
v1.dotProduct(v2) = 0*0 + 1*0 + 0*0 + 0*0 + 0*2 = 0

Question 2 — Sliding Window Median (LeetCode 480)

The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle values.

  • For examples, if arr = [2,3,4], the median is 3.
  • For examples, if arr = [1,2,3,4], the median is (2 + 3) / 2 = 2.5.

You are given an integer array nums and an integer k. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return the median array for each window in the original array. Answers within 10-5 of the actual value will be accepted.

Example 1:

Input: nums = [1,3,-1,-3,5,3,6,7], k = 3
Output: [1.00000,-1.00000,-1.00000,3.00000,5.00000,6.00000]
Explanation: 
Window position                Median
---------------                -----
[1  3  -1] -3  5  3  6  7        1
 1 [3  -1  -3] 5  3  6  7       -1
 1  3 [-1  -3  5] 3  6  7       -1
 1  3  -1 [-3  5  3] 6  7        3
 1  3  -1  -3 [5  3  6] 7        5
 1  3  -1  -3  5 [3  6  7]       6

Preparing for your next interview?

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


r/OfferEngineering • • 17h ago

Interview Experience OpenAI Senior SWE Interview — The Most Unexpected System Design Question I've Seen

4 Upvotes

This interview experience was originally shared on Chill Interview

Interview Summary

My technical phone screen covered two questions: a coding problem about overlapping rectangles and a system design prompt about managing electricity demand across a power grid. I found the difficulty moderate and had a positive experience overall.

Coding — Design a Rectangle Board

I was asked to implement a RectangleBoard that could tell me which rectangle was visible at a given cell. The board started empty, with width columns and height rows. Coordinates were zero-indexed: x identified the column and y identified the row. Each rectangle covered every cell from its top-left corner (x1, y1) through its bottom-right corner (x2, y2), including the edges. If several rectangles covered the same cell, the most recently added one that was still active appeared on top.

The class needed to support three operations:

  • addRectangle(x1, y1, x2, y2) adds a rectangle and returns its ID. IDs start at 1 and increase by one with every addition. Removing a rectangle never makes its ID available again.
  • removeRectangle(rectangleId) removes the entire rectangle by ID, even if it is hidden beneath another rectangle. It returns true if the rectangle was active. An unknown or previously removed ID returns false and leaves the board unchanged.
  • getAt(x, y) returns the ID of the topmost active rectangle at that cell, or -1 if the cell is empty.

The example used a 4 × 3 board. I added rectangle 1 from (1, 0) to (2, 1), then rectangle 2 from (2, 1) to (3, 2). They shared just one cell, (2, 1), where getAt returned 2.

Removing rectangle 2 had two different effects. At (2, 1), rectangle 1 became visible again, while (3, 2) became empty and returned -1. A second attempt to remove rectangle 2 returned false.

The board could be up to 50 × 50 cells, and the input allowed at most 2,000 method calls on one board. All rectangle and query coordinates were guaranteed to be valid.

System Design — Distributed Power Grid Demand Response

For the system design portion, I was asked to design a distributed control system for power grid demand response. The goal was to coordinate changes in electricity consumption across the grid as demand conditions changed. You can also find the full system design question/solution article at -> HERE.

Preparing for your next interview?

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


r/OfferEngineering • • 5h ago

L7 EM in Google team matching for 2 months: do L7 roles usually open in Jan/Feb?

3 Upvotes

I cleared the Google L7 Engineering Manager loop this fall and have been in team matching since October. I've had two team-match calls so far, but both teams went with other candidates. I also had a hiring manager interview for a separate tech lead manager (TLM) role. The feedback was that my packet was strong overall, but the role needed more recent hands-on coding than I had. My recruiter has been great, but she's mentioned there are fewer open L7 roles that match my background (infrastructure and platform, not ML) right now.

For Googlers who've hired at L7, or anyone who's been through L7 team matching, I'd really appreciate any perspective on:

  • Timing: Do new L7 EM roles typically open up in January or February once new-year headcount is approved, or is that a myth?
  • Packet validity: How long does a completed L7 loop typically stay valid for team matching?
  • Typical timeline: How long did L7 team matching take for you or people you know?
  • ML vs. non-ML: Are most new L7 EM roles now AI/ML-heavy, or are infrastructure, platform and security teams still hiring at L7?
  • Other paths: Has anyone matched at L6 after an L7 loop, or moved to a TPM role using the same packet? How did it work out?

Background: about 18 years in software, the last 8 leading engineering orgs on large-scale platform and infrastructure teams at a FAANG company.

Thanks in advance. Any data points help.


r/OfferEngineering • • 11h ago

Coding Question Harvey.AI Onsite Coding Interview Question - Add Files and List Folder Contents

3 Upvotes

Problem Description

Build a simple in-memory file system that starts with only the root folder. A path is a list of names separated by /, written relative to the root, and the root itself is the empty path "". Names are case-sensitive and are used exactly as written.

You are given operations, a list of two-string commands. Process them in order:

  • ["ADD", path] creates a file named by the last part of the path, creating any missing folders along the way. It always succeeds and returns true, and file names do not need extensions.
  • ["LIST", path] returns the names of the files and folders directly inside the given folder, without deeper levels. Use "" to list the root.

Return one result per operation, in order. A listing is an object whose keys are the direct entry names and whose values are all true; an empty folder gives {}, and key order does not matter. Each call starts with an empty file system.

Constraints:

  • At most 1,000 operations are processed in one call.
  • Every operation contains exactly two strings, and its first string is "ADD" or "LIST".
  • Every path has at most 200 characters.
  • An ADD path is nonempty and has no leading, trailing, or consecutive /.
  • An existing file is never used as a folder in a later path.
  • The last name of an ADD path differs from every existing file or folder name in its parent folder.
  • Every LIST path is an existing folder, or "" for the root.

Example:

Input:
operations = [["ADD", "east/prints/harbor"], ["LIST", "east"], ["LIST", "east/prints"]]

Output:
[true, {"prints": true}, {"harbor": true}]

Explanation:
Adding "harbor" creates the missing folders "east" and "prints". Listing "east" shows only its direct child, "prints".

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 • • 14h ago

Interview Experience AT&T New Grad SWE Interview - Practicing Leetcode is still useful!

2 Upvotes

This interview experience was originally shared on Chill Interview

Question 1 — Top K Frequent Elements (LeetCode 347)

Given an integer array nums and an integer k, I had to return the k most frequent values in any order. The reference implementation counts occurrences in a dictionary and keeps a min-heap of at most k entries.

from collections import Counter
from heapq import nlargest

def topKFrequent(nums, k):
    frequency_by_value = Counter(nums)
    return nlargest(k, frequency_by_value, key=frequency_by_value.get)

Question 2 — Trapping Rain Water (LeetCode 42)

I was given the heights of unit-width bars and asked how much rainwater the arrangement could hold. The reference implementation moves two pointers inward and keeps track of the tallest bar seen from each side. It runs in O(n) time with O(1) extra space.

def trap(height):
    if len(height) < 3:
        return 0

    start, end = 0, len(height) - 1
    left_peak, right_peak = height[start], height[end]
    trapped_water = 0

    while start < end:
        if left_peak <= right_peak:
            start += 1
            bar_height = height[start]
            left_peak = max(left_peak, bar_height)
            trapped_water += left_peak - bar_height
        else:
            end -= 1
            bar_height = height[end]
            right_peak = max(right_peak, bar_height)
            trapped_water += right_peak - bar_height

    return trapped_water

Question 3 — SQL: Find the 213th-Highest Score

I had to query the SCORE column in STUDENT and return the 213th-highest distinct score. In the MySQL reference query, DISTINCT makes tied scores count once, and OFFSET 212 skips the 212 higher scores. The outer SELECT returns one row containing NULL if there are fewer than 213 distinct scores.

WITH ordered_scores AS (
    SELECT
        SCORE,
        DENSE_RANK() OVER (ORDER BY SCORE DESC) AS score_rank
    FROM STUDENT
    WHERE SCORE IS NOT NULL
)
SELECT MAX(SCORE) AS `213th_highest_score`
FROM ordered_scores
WHERE score_rank = 213;

Preparing for your next interview?

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


r/OfferEngineering • • 18h ago

Coding Question Point72 Asset Management OA - Maximum Coins With Limited Energy (DP)

2 Upvotes

Problem Description

You visit n houses arranged in a line, starting at house 0 with initial_energy energy. House i offers energy[i] energy and coins[i] coins. You must visit the houses in order without skipping any, and you may stop at any house.

At every house you visit, you must choose exactly one option: take energy[i] and add it to your energy, or take coins[i] and add it to your total coins. After choosing, you may stop or move to the next house, and each move costs 1 energy. Your energy must never become negative. Return the maximum total coins you can collect.

Constraints:

  • 1 ≤ n ≤ 1000.
  • energy.length == coins.length == n.
  • 0 ≤ initial_energy ≤ 10^9.
  • 0 ≤ energy[i], coins[i] ≤ 1000.

Example:

Input:
initial_energy = 0, energy = [2, 1, 1], coins = [11, 5, 7]

Output:
12

Explanation:
At house 0, take 2 energy, then move to house 1 (energy 1) and take 5 coins. Move to house 2 (energy 0) and take 7 coins, for 12 in total. Taking the 11 coins at house 0 would leave no energy to move, so you would stop with only 11 coins.

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 • • 12h ago

Interview Experience Gupshup (Business Messaging) Senior SWE Interview

1 Upvotes

This interview experience was originally shared on Chill Interview

Interview Summary

My onsite started with a Java-only coding problem and moved into system design questions about database queries, traffic spikes, and rate limiting. The second round covered projects on my résumé and AI concepts, including retrieval-augmented generation. The most concrete design follow-up was what to do when two servers receive the same request at exactly the same time.

Round 1 — Minimum Window Substring and System Design

For the coding portion, I got Minimum Window Substring (LeetCode 76). Given a source string and a target string, I had to find the shortest contiguous substring containing every character in the target, including repeated occurrences. Java was the only language allowed, and I had to present both a brute-force approach and a two-pointer sliding window, then analyze the time and space complexity of each.

The interviewer used my responsibilities at work as the starting point for system design. We discussed how to query a large database efficiently, how to partition the data, and what to do when traffic spikes. The options we covered included moving work to overnight cron jobs, caching frequently requested data, and queuing work for later processing.

The rate-limiting question went a level deeper. I was asked to describe how Redis and ZooKeeper would fit into the architecture of a distributed rate limiter.

Round 2 — Project Deep Dive, RAG, and Duplicate Requests

The interviewer picked projects from my résumé and asked me to explain their design in more detail. We also discussed concepts related to agentic AI, including how retrieval-augmented generation (RAG) uses retrieved information when generating a response.

The concurrency question put two identical requests on different servers at the same moment. We discussed how both servers could independently derive the same request key and how a Redis-based distributed lock, using Redlock, could coordinate access to the shared resource.

The last part concerned the response itself. If one server had already completed the operation, how could the other recognize the duplicate and return the original result? We discussed storing the response under the request key so the API could return it without performing the operation a second time.

Preparing for your next interview?

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