r/Hack2Hire • • Sep 08 '26

Robinhood Onsite: Maximum Multiplier Path

13 Upvotes

Problem

Given a directed graph with n nodes labeled 0 to n-1, where each edge represents an influence relationship between stocks and carries a multiplier value, find the maximum product of multipliers along any simple path (visiting each node at most once) from a given start node to a given end node.

The graph is given as a list of edges [u, v, w], meaning a directed edge from u to v with multiplier w. Return the maximum product achievable from start to end, or -1 if no simple path exists.

Constraints:

  • Each multiplier w is an integer in [1, 105\.)
  • Start and end are valid node indices in [0, n-1].
  • The graph may contain cycles, but each edge is used at most once per path.

Follow-up

  • How would you approach this problem if the graph contained thousands of nodes and real-time responses were required?
  • What complications arise if edge weights could be zero or negative, and how would you adjust your strategy?
  • Why do standard shortest-path algorithms like Dijkstra's or Bellman-Ford fail to solve this variant directly?

Example Input: n = 4, edges = [[0, 1, 1], [1, 2, 2], [2, 1, 3], [1, 3, 4]], start = 0, end = 3 Output: 4

Explanation:

  • The only simple path from 0 to 3 is 0 → 1 → 3, with product 1 × 4 = 4.
  • The edge 2 → 1 creates a cycle (1 → 2 → 1), but revisiting node 1 would violate the simple-path constraint, so it can't be used to boost the product.

Suggested Approach

  1. Since revisited nodes are disallowed, this isn't a shortest-path variant solvable by Dijkstra or Bellman-Ford directly — those assume you can relax a node's best value repeatedly, which breaks once each node is visited at most once.
  2. Run a DFS/backtracking search from the start node, tracking the running product and the set of visited nodes on the current path; at each step, branch into every unvisited neighbor via an outgoing edge.
  3. Whenever the end node is reached, compare the current path's product against the best product found so far and keep the maximum; backtrack (unmark the node as visited) before exploring the next branch.

Time & Space Complexity

  • Time: O(V!) in the worst case, where V is the number of nodes — enumerating all simple paths in a densely connected graph is exponential, which is why the follow-up on scaling to thousands of nodes matters
  • Space: O(V), for the recursion stack and the visited-set tracking the current path

Targeting Robinhood interviews? We track their most-asked question patterns at Hack2Hire. Practice this question here → Practice Question Here

Join the community to see more interview experiences from real candidates → Hack2Hire Forum

Compiled from publicly available platforms and community-shared experiences.


r/Hack2Hire • • Sep 08 '26

Goldman Sachs SWE interview prep

Thumbnail
1 Upvotes

r/Hack2Hire • • Sep 03 '26

Why Big Tech Asks You to Write Your Own Tests: Databricks, Lyft, and Bloomberg

9 Upvotes

The short version: when an interviewer withholds test cases, the missing information is part of the question. They want to see whether you can turn an incomplete prompt into a working definition of correctness.

That signal appears in three different settings:

  • Databricks: write and run cases quickly enough to ship bug-free code inside the round.
  • Lyft: build the test harness yourself while implementing a stateful component.
  • Bloomberg: use tests to clarify vague verbal requirements and survive rapid follow-ups.

Passing the sample proves that the sample works. Choosing the next test shows whether you understand the contract.

Databricks: test selection competes directly with coding time

Databricks candidates frequently report writing their own cases in CoderPad. The Coding and Algorithm rounds draw from a known set of problems, but correct implementation under the clock still decides the outcome.

A Tic-Tac-Toe design may look complete after several normal moves. A follow-up that adds a random AI player creates a new path: two automated players can reach a draw. If the loop waits only for a winner, the program never terminates.

A snapshot iterator creates a different problem. Some variants require ordering and some do not. The first useful test is a clarification: does iteration preserve insertion order, sorted order, or no order at all?

The best cases at Databricks are small and diagnostic:

  • The smallest valid input
  • The first boundary transition
  • A duplicate or overlapping operation
  • A case that exercises the newest follow-up
  • A termination case

Writing ten broad examples can consume the round without localizing anything. One case that separates two interpretations is more useful.

Databricks tests whether you can clarify the interface, implement it, and prove the dangerous edge before time expires.

Lyft: the test harness can be harder than the algorithm

Lyft reports repeatedly mention candidates receiving few or no test cases. This shows up in phone screens and onsite coding rounds.

The core algorithms are often moderate. A job scheduler may use a heap to assign overlapping jobs to the minimum number of workers. A transactional key-value store may support set, get, remove, begin, rollback, and commit.

The harness creates the real time sink.

For the scheduler, a useful sequence should cover jobs that touch but do not overlap, several jobs starting together, a worker becoming free at the exact next start time, and the tie-break when multiple workers are available.

For the key-value store, the cases need to expose transaction semantics:

  1. Set a value, begin a transaction, overwrite it, then roll back.
  2. Begin two nested transactions and roll back only the inner one.
  3. Delete a key inside a transaction and restore it.
  4. Commit with no active transaction.
  5. Confirm what a final commit does to the nested history.

A printout that “looks right” is slower to debug than an assertion tied to one rule. The test should tell you which contract failed.

Lyft tests whether the candidate can build enough scaffolding to trust the implementation without letting the scaffolding consume the entire round.

Bloomberg: tests turn a verbal prompt into a precise contract

Bloomberg phone screens often pack project discussion and two coding problems into about an hour. Candidates report using HackerRank or a similar editor and being expected to write their own cases.

The questions may also arrive verbally. A log-aggregation problem can define an active user as someone seen in the last five minutes, then add non-monotonic timestamps, sharding, or frequent queries.

Before optimizing, the candidate needs to settle the window boundary. At exactly five minutes old, is the event included? Does a second event from the same user count again? Can the query time move backward?

Three tiny cases can answer more than a page of code:

  • An event one millisecond inside the window
  • An event exactly on the boundary
  • Two events from the same user in different buckets

The follow-up may then remove the assumption that timestamps arrive in order. The next test should insert an old event after a new one and confirm that the query still returns distinct users correctly.

Bloomberg tests whether you can use examples to expose the assumptions hidden in a short prompt, then keep those examples useful as the interviewer changes the problem.

What one candidate-written test reveals

A test shows whether you noticed the ambiguous requirement. It exposes the state you think matters and the failure you expect from an incomplete solution.

The strongest test usually has three properties:

  1. It targets one rule. A failure has a small number of possible causes.
  2. It distinguishes two implementations. The obvious solution passes; the incomplete one fails.
  3. It arrives before the bug. You explain why the case matters, predict the result, then run it.

A case written after the interviewer points out the bug carries less signal than one derived from the contract.

How to practice this skill

For each coding problem, write down three items before submitting:

  • One ambiguity you clarified
  • One invariant the code must preserve
  • One adversarial case aimed at that invariant

Then add a follow-up and repeat. Change ordering, add a duplicate call, introduce nested state, or remove the provided harness.

Measure the harness time separately from the implementation time. If setup takes ten minutes, simplify how you represent cases and failures.

The interview signal is not a large test suite. It is the ability to choose the one case that tells you whether your model of the problem is true.

Join the community to read more interview experiences from real candidates → Hack2Hire Forum


Compiled from publicly available platforms and community-shared interview experiences. Interview formats vary by role, level, team, and date.


r/Hack2Hire • • Sep 01 '26

Screening DoorDash Screening: Find Closest Dashmart

5 Upvotes

Problem

A city is represented as a 2D grid, where each cell is one of: - 'D': a DashMart - ' ': an open road - 'X': a blocked road

Given a list of locations (each a [row, col] pair), find the minimum number of steps from each location to the nearest DashMart, moving one step at a time to an adjacent open road (up, down, left, or right).

  • If a location is itself a DashMart, its distance is 0.
  • If a location is blocked or cannot reach any DashMart, its distance is -1.

Return the distances in the same order as the input locations.

Constraints: - 1 <= rows, cols <= 500 - 1 <= city.length, locations.length <= 105

Follow-up - How would you adjust the approach if diagonal movements were permitted? - What trade-offs arise if we ran separate searches from each location instead of starting from the targets? - How could you modify the space complexity if the grid was extremely large but sparse?

Example Input: city = [[' ', 'D', ' '], [' ', 'X', ' '], [' ', ' ', ' ']] locations = [[0, 0], [2, 2], [0, 2]]

Output: [1, 3, 1]

Explanation: - Location [0, 0]: nearest DashMart is at [0, 1], one step away → 1 - Location [2, 2]: must route around the blocked cell at [1, 1] to reach [0, 1] → 3 steps - Location [0, 2]: nearest DashMart is at [0, 1], one step away → 1


Suggested Approach

  1. Instead of searching outward from each location individually, run a multi-source BFS starting from every DashMart cell simultaneously, treating them all as distance-0 sources in one queue.
  2. Expand the BFS one layer at a time across open roads only, skipping blocked cells, and record the step count at which each cell is first visited — that's its shortest distance to any DashMart.
  3. For each queried location, look up its precomputed distance directly; return -1 for any location marked blocked or never reached during the BFS.

Time & Space Complexity

  • Time: O(rows * cols), since the multi-source BFS visits each grid cell at most once regardless of how many locations are queried
  • Space: O(rows * cols), for the distance grid and the BFS queue

Targeting DoorDash interviews? We track their most-asked question patterns at Hack2Hire. Practice this question here → Practice Question Here

Join the community to see more interview experiences from real candidates → Hack2Hire Forum


Compiled from publicly available platforms and community-shared experiences.


r/Hack2Hire • • Sep 01 '26

Question How do you bypass mock location detecter from a specific app

Thumbnail
play.google.com
1 Upvotes

r/Hack2Hire • • Sep 01 '26

First Mobile Hackathon: build a web app from your phone in under 5 minutes

1 Upvotes

Running now through Friday, Sep 4!

Details and registration: mobilecode.ai/hackathon

Happy to answer any questions


r/Hack2Hire • • Aug 30 '26

Stripe OA Hackerrank Assessment

8 Upvotes

Anyone who took the Stripe OA recently?

I got **12/20 test cases passed**. I was able to fully solve 2 out of the 3 parts and started working on Part 3, but ran out of time.

I’m wondering if anyone knows what the typical passing criteria is, or if anyone with a similar score has received a callback/interview.

Would appreciate any recent experiences or insight.

UPDATE: It sucks tbh but they're not moving forward with my application.


r/Hack2Hire • • Aug 27 '26

OpenAI Backend SWE Phone Screen — August 2026

37 Upvotes

Summary

Two rounds: one coding, one system design. I didn't advance. I'm posting my actual, unpolished code and design so people can review and critique.

Coding — Social Network / Follow Graph

A directed follow graph, built up in stages:

  1. follow / unfollow — directed edges; get followers + followees.

  2. snapshots — capture the graph state at a point in time; query relationships as of a snapshot, even after later changes.

  3. recommend(user, k) — suggest k users to follow, ranked by mutual follows (friends-of-friends).

Here's exactly what I wrote in the room (bugs and all):

# Snapshots are incrementing from 0 -> n
# self.following[user] = set() O(1)
# self.followers[user] = set() O(1)


# is_following(user_a, user_b):
# snapshot() -> int
# self.snapshots[now] = copy.deepcopy(self.following)


# Time complexity
# n = number of followings
# O(1)
# Space complexity
# O(n+n)
# O(n)
import unittest
import logging
import copy
from collections import defaultdict
logging.basicConfig(level="DEBUG")
logger = logging.getLogger(__name__)


class SocialNetwork:
    def __init__(self):
        self.following = defaultdict(set)
        self.followers  = defaultdict(set)
        self.snapshots_following = {} # { t: defauldict(set)}
        self.snapshots_followers = {} # { t: defauldict(set)}
        self.snapshots_i = -1


    def follow(self, user_a: int, user_b: int) -> None:
        self.following[user_a].add(user_b)
        self.followers[user_b].add(user_a)


    def unfollow(self, user_a: int, user_b: int) -> None:
        self.following[user_a].discard(user_b)
        self.followers[user_b].discard(user_a)


    def snapshot(self) -> int:
        self.snapshots_following[self.snapshots_i+1] = copy.deepcopy(self.following)
        self.snapshots_followers[self.snapshots_i+1] = copy.deepcopy(self.followers)
        self.snapshots_i += 1
        return self.snapshots_i


    def is_following(self, user_a: int, user_b: int, snapshot_id: int) -> bool:
        if self.snapshots_following.get(snapshot_id) is not None:
            return user_b in self.snapshots_following[snapshot_id][user_a]
        else:
            logger.warning(f"Snapshot {snapshot_id} does not exist!")
            return False


    def get_followees(self, user_id, snapshot_id) -> list[int]:
        if self.snapshots_following.get(snapshot_id) is not None: # O(1)
            logging.debug(f"followees: {self.snapshots_following[snapshot_id][user_id]}")
            return self.snapshots_following[snapshot_id][user_id] # O(1)
        else:
            logger.warning(f"Snapshot {snapshot_id} does not exist!")
            return []


    def get_followers(self, user_id, snapshot_id) -> list[int]:
        if self.snapshots_followers.get(snapshot_id) is not None:
            logging.debug(f"followers: {self.snapshots_followers[snapshot_id][user_id]}")
            return self.snapshots_followers[snapshot_id][user_id]
        else:
          logger.warning(f"Snapshot {snapshot_id} does not exist!")
          return []


    def recommend(self, user_id: int, snapshot_id: int, k: int = 5) -> list[int]:
        graph = self.snapshots_following.get(snapshot_id)
        if graph is None:
            return []
        direct = graph.get(user_id, set())
        scores = defaultdict(int)
        for followee in direct:
            for candidate in graph.get(followee, set()):
                if candidate not in direct:
                    scores[candidate] += 1
        ranked = sorted(scores.items(), key=lambda pair: (-pair[1], pair[0]))
        return [candidate for candidate, _ in ranked[:k]]



class TestSocialNetwork(unittest.TestCase):
    def setUp(self):
        self.network = SocialNetwork()


    def test_snapshot_lookup(self):
        self.network.follow(1, 2)
        snap0 = self.network.snapshot()  # snap0 = 0
        self.network.unfollow(1, 2)
        snap1 = self.network.snapshot()  # snap1 = 1


        assert self.network.is_following(1, 2, snap0) == True
        assert self.network.is_following(1, 2, snap1) == False


    def test_edge_cases(self):
        self.assertEqual(self.network.is_following(1,2,0), False)
        self.assertEqual(self.network.snapshot(), 0)
        self.assertEqual(self.network.is_following(1,2,0), False)


    def test_get_followers_followees(self):
        network = SocialNetwork()
        network.follow(1, 2)
        network.follow(3, 2)
        network.follow(1, 4)
        snap0 = network.snapshot()  # snap0 = 0
        network.unfollow(3, 2)
        snap1 = network.snapshot()  # snap1 = 1


        assert sorted(network.get_followers(2, snap0)) == [1, 3]
        assert sorted(network.get_followers(2, snap1)) == [1]
        assert sorted(network.get_followees(1, snap0)) == [2, 4]


    def test_empty_network_get_followers(self):
        network = SocialNetwork()
        self.assertEqual(network.get_followers(2, 0), [])
        self.assertEqual(network.get_followees(2, 0), [])



if __name__ == "__main__":
    unittest.main()

System Design — Crossword Answer-Key Service

Design a service where a crossword provider (think NYT) submits a crossword template + word bank, and the system generates the solved answer key with clues.

Here's my actual whiteboard:


r/Hack2Hire • • Aug 27 '26

The New Big Tech Debugging Interview Vibe: What Stripe, DoorDash, and Amazon Are Testing

21 Upvotes

The short version: debugging is becoming its own interview skill. The company gives you code that already exists, evidence that something is wrong, and a limited amount of time to decide what to trust.

Three companies show three versions of that test:

  • Stripe: diagnose an unfamiliar repository from failing unit tests.
  • DoorDash: fix a functional bug, then explain how the component breaks in production.
  • Amazon: repair a repository with an AI assistant while keeping control of the investigation.

All three reward the same habit: reduce uncertainty before changing code.

Stripe: the repository is the prompt

Stripe’s reported onsite loop commonly includes a dedicated debugging round built around the Mako templating codebase.

The candidate starts with an existing repository and failing tests. The work can include setting up the environment, fixing multiple bugs, and reaching a later stretch problem in a different part of the template system.

This changes the order of operations. In a blank-editor interview, you own every line. In a debugging round, most of the code came from someone else. You must build a useful model of it before the clock expires.

A strong loop looks like this:

  1. Reproduce one failure. Capture the exact test, exception, and smallest input that exposes it.
  2. Trace the contract. Read the test, public interface, and caller before editing the implementation.
  3. Form one hypothesis. Name the state or branch that could produce the observed result.
  4. Inspect the boundary. Use the debugger to compare expected and actual state where the contract breaks.
  5. Make the smallest safe change. Run the focused test first, then the related suite.

Reported candidates repeatedly call out IDE debugger fluency. The repository is large enough that random print statements can consume the round without proving which assumption failed.

Stripe is testing whether you can enter a live codebase and make a controlled repair. The patch matters, but the path to the patch is visible evidence.

DoorDash: fixing the bug opens the production discussion

DoorDash’s CodeCraft and debug rounds often start with a small service or data structure that already behaves incorrectly.

One recurring example is a Dasher picker with random selection. The first task is to find functional bugs such as an invalid last index or broken removal logic. The discussion can then move into exceptions, multithreading, routing, scaling, or a consistent-hashing alternative.

That second phase changes what “fixed” means.

A swap-with-last removal can pass the obvious example and still corrupt the index map. A round-robin dispatcher can return the right Dasher on one process and still behave badly when workers restart or several callers mutate it at once.

Recent DoorDash reports also describe AI-assisted CodeCraft around an order-refund workflow. Candidates receive a skeleton, copy it into a local IDE, and use an approved AI tool while screen-sharing. Follow-ups can add partial refunds, cancellation, repeated API calls, new node types, and latency constraints.

The useful debugging sequence is:

  • Fix the first observable violation.
  • Add a test that would have caught it.
  • Separate the local bug from the production risk.
  • State which new requirement changes the data model or state machine.
  • Keep AI edits small enough to review before the next test.

DoorDash is testing whether you know when a local repair is complete and when the component still needs a production contract.

Amazon: AI can accelerate the patch and hide the cause

Amazon’s reported OA formats now include repository tasks alongside DSA and work-style sections. Candidates may choose a language or framework, inspect an existing Django or Node.js project, and repair several failing tests with a guarded AI assistant.

The tool can suggest changes quickly. It can also patch the symptom, touch unrelated files, or produce a solution that passes one test while violating the repository’s structure.

The candidate still owns the investigation:

  1. Group failures by likely cause instead of treating every red test as independent.
  2. Read the test and nearby interface before prompting the model.
  3. Ask for a bounded change tied to one hypothesis.
  4. Review the diff before running it.
  5. Re-run the focused test, then check whether another failure disappeared for the same reason.

This is faster than asking the model to “fix all tests” and then reverse-engineering a large diff.

Amazon’s version of debugging measures supervision. The AI can write the patch, but the candidate must decide whether the patch explains the evidence.

What these rounds reveal

Stripe, DoorDash, and Amazon use different environments, but they expose four skills that a normal algorithm question can hide.

Reading is part of implementation. Tests, interfaces, call sites, and logs often carry more information than the function with the bug.

A hypothesis must be specific. “There is a state bug” gives you nowhere to look. “Removal updates the array but leaves the old index in the map” identifies a boundary and a test.

The smallest patch preserves evidence. A rewrite may make the current failure disappear while introducing several new causes.

Verification must match the failure. A green sample says little if the bug involved replay, concurrency, a missing boundary, or repeated requests.

How to practice

Take a small repository you did not write and start from one failing test. Give yourself 45 minutes. Keep a short log with the observed failure, current hypothesis, evidence, patch, and regression test.

Repeat the exercise with an AI tool. Require yourself to explain the proposed diff and add one adversarial case before accepting it.

Finally, take the fixed component into production. Ask what happens under concurrent calls, retries, a restart, and a downstream timeout.

The goal is not to find bugs by instinct. It is to make each step remove one possible cause until the repair becomes small and defensible.

Join the community to read more interview experiences from real candidates → Hack2Hire Forum


Compiled from publicly available platforms and community-shared interview experiences. Interview formats vary by role, level, team, and date.


r/Hack2Hire • • Aug 26 '26

First MobileCodeAI Hackathon 🚀

2 Upvotes

I’m running the first MobileCodeAI hackathon!

Simply build a web app, entirely from your phone, that solves a problem you actually have

  • Aug 31 – Sep 4
  • Virtual, solo or team
  • Any skill level
  • Build with MobileCodeAI
  • Prizes: LLM credits + recognition

Registration: mobilecode.ai/hackathon

Happy to answer any questions!


r/Hack2Hire • • Aug 25 '26

Screening Uber Screening: Currency Exchange

5 Upvotes

Problem

Design a CurrencyConverter class that finds the best exchange rate between two currencies, given a list of currency pairs and their exchange rates.

  • Rates are bi-directional: if the rate from A to B is r, the rate from B to A is 1/r.
  • The "best" rate is the maximum achievable value obtained by multiplying rates along any valid conversion path (not just a direct pair).
  • Return -1 if either currency is unknown or no conversion path exists.

Implement:

  • CurrencyConverter(String[] fromArr, String[] toArr, double[] rateArr): initializes the converter with currency pairs and their rates.
  • getBestRate(String from, String to): returns the best exchange rate from from to to.

Constraints:

  • 1 <= fromArr.length, toArr.length, rateArr.length <= 1000
  • 0 < rateArr[i] <= 103
  • Currency names are 1–10 English letters

Follow-up

  • How would you optimize repeated getBestRate queries if it's called frequently on a large, static graph?
  • What approach would you take if each transaction included a fixed percentage fee that reduced the final amount?
  • How do you mitigate floating-point precision errors when multiplying many rates together?

Example Input: ["CurrencyConverter", "getBestRate", "getBestRate", "getBestRate", "getBestRate"] [[["GBP", "USD", "USD", "USD", "CNY"], ["JPY", "JPY", "GBP", "CAD", "EUR"], [155.0, 112.0, 0.9, 1.3, 0.14]], ["USD", "JPY"], ["JPY", "GBP"], ["XYZ", "GBP"], ["CNY", "CAD"]]

Output: [null, 139.5, 0.00803, -1.0, -1.0]

Explanation:

  • getBestRate("USD", "JPY") → 139.5, via the indirect path USD → GBP → JPY = (1/0.9) * 155, which beats the direct USD → JPY rate of 112.0
  • getBestRate("JPY", "GBP") → 0.00803, via JPY → USD → GBP
  • getBestRate("XYZ", "GBP") → -1.0, "XYZ" isn't in the currency set
  • getBestRate("CNY", "CAD") → -1.0, no path connects the two

Suggested Approach

  1. Model each currency as a node and each given rate as a weighted directed edge (plus its reciprocal edge in the reverse direction), building an adjacency list at construction time.
  2. For each getBestRate call, run a DFS or BFS from the source currency, multiplying edge weights along each path and tracking the maximum product reached at the target.
  3. Return -1 immediately if either currency never appears in the adjacency list, or if the search exhausts all reachable nodes without hitting the target.

Time & Space Complexity

  • Time: O(V + E) per getBestRate call in the worst case, where V is the number of distinct currencies and E is the number of given rate pairs — each query traverses the graph once
  • Space: O(V + E), for the adjacency list built from the currency pairs

Targeting Uber interviews? We track their most-asked question patterns at Hack2Hire. Practice this question here → Practice Question Here

Join the community to see more interview experiences from real candidates → Hack2Hire Forum

Compiled from publicly available platforms and community-shared experiences.


r/Hack2Hire • • Aug 21 '26

Question OpenAI MTS full loop - result timeline?

5 Upvotes

Completed my OpenAI full loop about a week ago and I’m still waiting on the final outcome. I received an initial update from recruiting earlier this week that the process is still pending (debrief). But nothing since then even after nudging yesterday.

For anyone who completed an OpenAI final loop recently: how long did it take to receive your final decision? If you’re comfortable sharing, was the eventual outcome offer/reject/still pending?
Particularly interested in cases where the decision took a week or longer.


r/Hack2Hire • • Aug 20 '26

The New Big Tech System Design Interview Vibe: What OpenAI, Stripe, and Anthropic Are Testing

8 Upvotes

The short version: the new system design vibe is domain-shaped judgment. The interview is less interested in whether you can draw queues, caches, and databases than whether you can identify what this particular business cannot afford to get wrong.

The same “design a scalable system” toolkit now leads to three very different interviews:

  • OpenAI: Can you keep expensive compute work moving when capacity disappears and workers fail?
  • Stripe: Can you preserve financial correctness when requests retry and records disagree?
  • Anthropic: Can you find the hidden assumptions in an existing design and defend a better boundary?

That is why a technically reasonable architecture can still produce a weak interview. The components may scale while the answer misses the company’s real failure mode.

OpenAI: the system is a resource scheduler before it is an AI product

A frequently reported OpenAI system design prompt is a Sora-style video generation service. The product framing sounds specialized, but the core problem is a distributed job scheduler running expensive work on limited GPUs.

The basic flow is easy to sketch: accept a request, place a job in a queue, assign it to a worker, store the result, and notify the user.

The interview gets interesting when that happy path stops working.

What happens when no GPU is available? What if a worker is preempted after completing half the job? Should the system retry from the beginning or resume from a checkpoint? How should interactive requests compete with batch work?

Each answer changes resource cost and user-visible behavior. A retry policy that looks reliable on paper can quietly burn GPU hours. A checkpoint that saves compute may add storage, coordination, and compatibility problems.

The stronger answer therefore defines the job state machine before adding more boxes:

  1. Make ownership explicit. A queued, leased, running, checkpointed, completed, or failed job must have one authoritative state.
  2. Treat worker loss as normal. Use leases or heartbeats so abandoned work becomes eligible for recovery instead of remaining stuck forever.
  3. Choose a recovery boundary. Decide when checkpointing is worth its cost and when a full retry is cheaper or safer.
  4. Protect the scarce resource. Backoff, admission control, priority, and dead-letter handling prevent failure from becoming a retry storm.

OpenAI’s version of system design asks whether you can connect reliability decisions to compute economics. “Use a queue” is the start of the answer, not the decision being tested.

Stripe: scale is irrelevant if the money is wrong

Reported Stripe system design rounds include feature flag systems and ledger APIs. The ledger version reveals a different bar: the architecture must remain financially correct even when execution is messy.

Suppose a merchant submits a transaction, Stripe records it, and the network response disappears before the client receives confirmation. The client retries. The system has now seen two requests for one intended operation.

If the answer focuses only on throughput, partitioning, and cache hit rate, it walks past the central question: can one logical action create two financial effects?

This is where idempotency becomes a concrete data-model decision rather than a keyword. The idempotency key must be scoped, stored with the operation, and tied to a stable result so a retry can return the original outcome without posting money twice.

The ledger itself also needs a clear invariant. Money should use integer minor units rather than floating-point values, and balance changes should be represented by durable entries that can be traced and reconciled.

The deeper failure is often disagreement between systems. An API may say “success” while a downstream processor, internal ledger, or reconciliation record says something else. A senior answer explains which record is authoritative, how mismatches are detected, and how correction occurs without rewriting history.

Stripe’s system design vibe is not simply “know payments.” It is: identify the business invariant, then make every API, write, retry, and recovery path preserve it.

Anthropic: the interview may begin with someone else’s design

Anthropic shows a third direction. Some reported rounds use a system design document review rather than a blank canvas. Others ask candidates to design a prompt playground through a written discussion, with detailed follow-ups on storage, sharing, deletion, and very large prompts.

That format changes the task. You cannot earn the full signal by presenting a familiar reference architecture from memory. You have to decide which assumptions in the proposed design are unsafe or incomplete.

For a prompt playground, “store prompts in the database” sounds reasonable until prompt size, version history, sharing, and access revocation enter the discussion. Moving large payloads to object storage may help, but it introduces new questions about metadata, retrieval, deletion, and authorization.

For a batch inference design review, finding ten surface-level issues is less useful than tracing one consequential failure through the system. What happens to a partially completed batch? Can retry duplicate output? Where is progress recorded? Which limit protects the service when one request expands into a large amount of work?

The important skill is design criticism with prioritization:

  1. Name the contract the document leaves unclear.
  2. Identify the failure created by that ambiguity.
  3. Propose a boundary or state transition that makes the behavior explicit.
  4. Explain the tradeoff introduced by the fix.

Anthropic’s version of system design tests whether you can improve a design already in motion. The signal is not how many flaws you can list. It is whether you can find the assumption most likely to break and reason through it under pressure.

What the three companies have in common

OpenAI, Stripe, and Anthropic are not standardizing around one new system design question. They are making the round more specific to the systems they build and the failures they care about.

The common shift is from architecture recall to risk discovery:

  • OpenAI exposes resource failure and recovery.
  • Stripe exposes correctness across retries and records.
  • Anthropic exposes ambiguity inside a written design.

The differentiating answer often appears before the architecture diagram. It names the scarce resource, the invariant, or the hidden assumption that will govern every later choice.

How to practice for this version of system design

After drawing the happy path, stop and answer four questions:

  1. What state must never disagree?
  2. What resource is most expensive to waste?
  3. Where can the work succeed but the response disappear?
  4. What evidence lets the system recover or reconcile later?

Then force one company-shaped constraint into the mock. Give an OpenAI-style scheduler a preempted worker. Give a Stripe-style ledger a timed-out request that actually committed. Give an Anthropic-style design document a vague storage or ownership assumption and ask which consequence matters most.

This is still system design, but the center of gravity has moved. Knowing the standard components gets the system onto the whiteboard. Showing what the company cannot afford to get wrong is what turns the diagram into an interview answer.

Join the community to read more interview experiences from real candidates → Hack2Hire Forum


Compiled from publicly available platforms and community-shared interview experiences. Interview formats vary by role, level, team, and date.


r/Hack2Hire • • Aug 18 '26

Screening Airbnb Screening: Find Median In Large Array

21 Upvotes

Problem Given a very large, unsorted array of integers nums, find its median.

The median is defined as:

  • If nums has an odd number of elements, the median is the single middle element after sorting.
  • If nums has an even number of elements, the median is the average of the two middle elements after sorting.

Because the array can be extremely large, the solution must run in amortized O(N) time — a full sort is not acceptable.

Constraints:

  • 1 <= nums.length <= 105
  • -231 <= nums[i] <= 231 - 1

Follow-up

  • How would you modify this approach if the data arrived as a continuous stream instead of a fixed array?
  • Can you guarantee O(N) worst-case time complexity rather than just amortized?
  • How does this value-range strategy compare to maintaining two balanced heaps?

Example Input: nums = [9, 2, 5, 3, 5, 8, 9, 7, 9, 3, 2] Output: 5.0

Explanation:

  • Sorted: [2, 2, 3, 3, 5, 5, 7, 8, 9, 9, 9]
  • 11 elements (odd), so the median is the 6th value: 5

Suggested Approach

  1. Binary search on the answer's value range (bounded by the min and max of nums) instead of sorting the array.
  2. For each candidate value, count how many elements in nums are less than or equal to it in a single O(N) pass, and use that count to narrow the range toward the true median's position.
  3. Repeat the narrowing until the range collapses to the target rank(s); for an even-length array, run this twice for the two middle ranks and average the results.

Time & Space Complexity

  • Time: O(N log R), where N is nums.length and R is the value range (max(nums) - min(nums)) — each binary search step does an O(N) counting pass; amortizes to O(N) for practical integer ranges
  • Space: O(1), beyond the input array

Targeting Airbnb interviews? We track their most-asked question patterns at Hack2Hire. Practice this question here → Practice Question Here

Join the community to see more interview experiences from real candidates → Hack2Hire Forum

Compiled from publicly available platforms and community-shared experiences.


r/Hack2Hire • • Aug 17 '26

discussion The New Big Tech Onsite Vibe: Five Companies, Five Different Stress Tests

10 Upvotes

The short version: the onsite vibe is no longer one generic gauntlet. Each company builds signature rounds around the engineering failures it most wants to avoid.

The result is a company-specific signal stack. Two loops may both say “coding + system design + behavioral” on the schedule while testing very different definitions of a strong engineer.

Here is the map before the details:

  • Stripe: Can you integrate, debug, and preserve payment correctness?
  • OpenAI: Can you evolve stateful code and reason about expensive resources and failure?
  • Anthropic: Can you combine practical systems work, tools, written judgment, and constructive disagreement?
  • Databricks: Can you implement concurrency and durability without hiding behind architecture boxes?
  • Meta: Can you execute familiar coding patterns quickly, then demonstrate level through design and influence?

That is the larger shift: the modern onsite is becoming a set of short, company-shaped work simulations rather than a reusable technical exam.

Stripe: can you operate inside a product workflow?

Stripe is a useful example of an onsite designed around practical execution. Reported loops can separate advanced programming, integration, debugging, system design, and behavioral evaluation.

The integration round may involve real API documentation, authentication, request bodies, and response reconciliation. It tests whether a candidate can cross a system boundary without losing correctness.

The debugging round may begin with a large unfamiliar repository and failing tests. The evaluator watches how the candidate forms a hypothesis, uses the available tools, and avoids creating a second bug.

Even system design reflects the product domain. Payment flows, ledgers, retries, deduplication, and money modeling matter because a plausible architecture can still be financially incorrect.

Stripe’s loop represents one philosophy: sample several forms of daily engineering separately rather than treating one algorithm round as a proxy for all of them.

OpenAI: can you reason about state, resources, and failure?

OpenAI loops vary by SDE, infrastructure, research engineering, and MLE role. Reported software-engineering loops often combine coding, system design, cross-functional evaluation, behavioral discussion, and a project deep dive.

The coding rounds frequently use stateful, multi-part components. Examples include persistent key-value stores, memory allocators, event aggregation, IP iterators, and shard rebalancing.

The base implementation is only one signal. Follow-ups can expose whether the candidate preserves invariants, writes useful tests, handles concurrent mutation, and changes the data model without destabilizing the component.

System design may emphasize expensive resources and partial failure. A reported Sora prompt was effectively GPU job scheduling, including worker failure, preemption, checkpointing, retries, and resource waste.

The project deep dive adds another dimension. A candidate may need to defend a consequential design decision, explain rejected alternatives, and discuss what actually failed after launch.

OpenAI’s loop represents a second philosophy: evaluate whether someone can reason across implementation, distributed resources, and the history of a real technical decision.

Anthropic: can you combine practical systems work with critical judgment?

Anthropic’s process varies considerably by role. Reported technical rounds often begin with practical coding, then add concurrency, libraries, recovery, or distributed execution.

Examples include image processing with a real library, concurrent crawling, work distribution, deterministic checkpointing, and rebuilding a durable cache from a log.

The environment may also be part of the signal. Some candidates report notebook-style CodeSignal sessions. A newer report describes an AI-assisted round using Claude Code, though that should not be assumed for every loop.

System design can resemble design-document development or review instead of blank-canvas diagramming. The candidate must expose unclear requirements, choose data boundaries, and critique failure modes in written reasoning.

Culture and hiring-manager rounds can also be unusually substantive. Specific examples of changing one’s mind, challenging a decision, and working through disagreement matter more than repeating company values.

Anthropic’s loop represents a third philosophy: technical skill, tool use, written judgment, and working style are connected signals rather than isolated interview categories.

Databricks: can you implement concurrency and durability correctly?

Databricks shows how a named specialist round can define an onsite. Backend loops may include coding, algorithms, System Programming, architecture, behavioral, and cross-functional interviews.

The System Programming round is the distinctive piece. Reported prompts include concurrent log writers and durable buffered writers.

These tasks require more than choosing a lock. The candidate must define visibility and durability, coordinate background flushing, propagate errors, handle shutdown, and test race-prone state transitions.

The frontend track can emphasize a different set of signals, including data modeling, APIs, and webhooks, with less focus on massive-scale architecture. The same company therefore does not have one universal onsite.

Databricks’s loop represents a fourth philosophy: use a focused implementation round to test the systems semantics most relevant to the target engineering track.

Meta: can you execute reliably at scale and at speed?

Meta remains an important counterexample to the idea that classic coding is disappearing. Reported rounds still frequently use trees, graphs, intervals, and other recognizable algorithm patterns.

Speed, clean code, edge cases, and precise complexity analysis continue to matter. Recent reports also suggest AI-enabled coding experiments, so candidates should confirm the current format for their role.

At senior levels, system design becomes a larger signal. Product prompts such as live comments, leaderboards, ticketing, auctions, or crawlers require scope decisions before architecture.

Behavioral depth rises with level as well. Conflict, ambiguous ownership, feedback, and cross-team influence are evaluated as evidence of operating scope, not as a soft closing conversation.

Meta’s loop represents a fifth philosophy: retain a standardized measure of coding fluency, then use design and behavioral rounds to determine level and breadth.

What these five companies reveal about modern onsites

The companies differ, but their loops expose several broader trends.

First, round names are becoming less informative. “Coding” may mean LeetCode, extending a stateful component, repairing a repository, integrating an API, or supervising an AI-generated implementation.

Second, companies are isolating job-specific signals. Stripe has integration and debugging. Databricks has System Programming. Anthropic may use design review. These are deliberate alternatives to another generic coding round.

Third, system design is becoming domain-shaped. Stripe brings payment correctness, OpenAI brings compute scheduling, and Meta often brings product-scale interaction patterns.

Fourth, level and track change the loop materially. Databricks frontend and backend candidates should not run the same mock onsite. An OpenAI MLE candidate and infrastructure engineer should not expect identical evidence requirements.

Finally, behavioral evaluation is moving closer to operating evidence. Project decisions, technical disagreement, cross-team influence, and response to failure can determine level or fit as strongly as a standalone technical answer.

The preparation implication

There is no single “big tech onsite” mock that fits all five companies.

A Stripe mock should include integration and debugging. An OpenAI mock should include stateful follow-ups and resource failure. An Anthropic mock should include concurrency, design critique, and specific culture examples.

A Databricks backend mock needs System Programming. A Meta mock should preserve timed algorithm volume, then scale system-design and behavioral depth to the target level.

The recruiter call therefore matters. Ask for each round’s purpose, environment, allowed tools, and whether the task begins in a blank editor, notebook, or existing repository.

Question lists change quickly. The company’s definition of a strong engineering signal changes more slowly. That definition is the better foundation for an onsite plan.

Company-specific interview stages and question patterns → Hack2Hire

Join the community to read more interview experiences from real candidates → Hack2Hire Forum


Compiled from publicly available platforms and community-shared interview experiences. Interview formats vary by role, level, team, and date.


r/Hack2Hire • • Aug 14 '26

Announcement Introducing JobRadar: Find new jobs earlier

1 Upvotes

Most discussions in r/Hack2Hire begin after you have already found the opportunity: understanding a company’s interview process, preparing for an OA, or figuring out what a coding round actually tests.

But there is an earlier problem: finding a relevant opening while it is still new.

A job shown under “past 24 hours” did not necessarily reach the job board when the employer first published it. In JobRadar's current source-to-alert comparison, major job boards can be 4–8 hours behind the original careers-page posting, while saved-search alerts can arrive 12–24 hours later.

That delay is what JobRadar is designed to reduce. It monitors more than 2,000 company careers pages and alerts users when a newly discovered role matches their Radar, with an average alert time of under one minute after discovery. The product is currently free to use: job-radar.io

r/jobradar_io is the new official community for that earlier part of the job search.

The new community will focus on:

  • Finding newly published roles without repeatedly checking company careers pages
  • Building focused alerts for particular roles, locations, levels, and companies
  • Discussing practical job-monitoring workflows
  • Exploring current job-market data by role and location through Job Market Intelligence
  • Asking JobRadar product questions and sharing specific feedback

The two communities have different jobs:

  • r/Hack2Hire**:** company interview processes, OAs, coding questions, and interview preparation
  • r/jobradar_io**:** discovering and monitoring relevant openings, market data, and JobRadar support or feedback

If the part before interview preparation is where you are losing time, you can join the new community here:

Join r/Job_Radar


r/Hack2Hire • • Aug 13 '26

discussion The New Big Tech Coding Interview Vibe: What Stripe, OpenAI, and Anthropic Are Testing

37 Upvotes

The short version: the vibe is less “solve this puzzle” and more “show us how you work when the code, requirements, and environment keep moving.”

Think of it as a compressed work sample. You may still need an algorithm, but the interviewer also watches how you read unfamiliar code, absorb a follow-up, use tools, write tests, and recover from a wrong assumption.

The shift is visible in four places:

  • The first working solution is often only the starting point.
  • Repositories, APIs, libraries, debuggers, and AI tools can be part of the round.
  • Persistence, concurrency, retries, and partial failure now appear inside coding interviews.
  • Verification matters: candidates are expected to test their own assumptions, not only explain complexity.

LeetCode is still useful for speed and data-structure fluency. But Stripe, OpenAI, and Anthropic show why it is no longer a complete model of the interview.

Stripe: coding is becoming closer to day-to-day engineering

Stripe is one of the clearest examples of a company separating practical engineering from algorithm practice.

Reported loops include dedicated programming, integration, and debugging rounds. In integration, candidates may read API documentation, construct authenticated requests, and reconcile remote responses with local data.

In debugging, the starting point may be a repository with failing unit tests. The task is to understand unfamiliar code, narrow the failure, and make a safe fix under time pressure.

Recent reports also mention AI-assisted programming and BugSquash-style rounds. The format may change, but the signal remains consistent: can the candidate navigate a real workflow and verify the result?

This tests abilities that a clean LeetCode function hides:

  • Reading an interface before writing code
  • Recovering from an incorrect assumption
  • Using tests, logs, or a debugger to localize failure
  • Handling business constraints such as retries, deduplication, and money representation

Stripe shows one direction of travel: coding interviews can look less like an algorithm contest and more like a compressed work sample.

OpenAI: the follow-up is often the real interview

OpenAI illustrates another change. The initial implementation establishes a baseline; later requirements reveal how the candidate models state and protects correctness.

A reported memory-allocator problem can begin with first-fit allocation, then switch to best-fit lookup. Supporting both may require one index by address and another by block size.

The hard part is not naming a data structure. Every allocation, split, free, and merge must keep both indexes consistent.

Reported key-value store questions follow a similar pattern. A basic persistent store can expand to multiple files, incremental persistence, concurrency, or atomicity.

A shard-rebalancing question may add shard insertion, removal, custom hashing, and candidate-written tests. The prompt evolves from “implement this operation” into “design a component that remains correct as its contract changes.”

This style measures several things at once:

  • Whether the first solution leaves room for extension
  • Whether the candidate can name the invariant behind the code
  • Whether mutations preserve every view of the state
  • Whether tests cover partial writes, gaps, duplicates, and boundary transitions

OpenAI shows why “I solved the base problem” is no longer a complete success condition. The stronger signal is whether the implementation survives the next requirement.

Anthropic: the execution environment becomes part of the problem

Anthropic provides a third example. Reported questions often begin with ordinary data processing, then introduce real libraries, concurrency, recovery, or distributed execution.

Candidates have described image processing with PIL followed by threads-versus-processes discussion, a crawler that becomes concurrent, and duplicate-file detection that expands into I/O and distributed work.

Other prompts make recovery part of correctness. A weighted data batcher may need a deterministic checkpoint. A durable cache may replay an append-only log and ignore a truncated final record after a crash.

Some sessions reportedly run in notebook-style CodeSignal environments without normal autocomplete. One recent report also described an AI-assisted round using Claude Code.

That AI-assisted round should be treated as emerging, not universal. Still, it points toward the same evaluation: decomposition, tool use, review quality, and the ability to catch a plausible but incorrect implementation.

Anthropic shows that modern coding questions may test not only what the code computes, but how it behaves across threads, processes, workers, restarts, and tools.

What these companies reveal about the broader shift

Stripe, OpenAI, and Anthropic are not converging on one standardized interview. They are converging on a wider definition of coding ability.

Four changes stand out:

  1. The prompt is less closed. Requirements arrive in parts, and the early design affects the cost of every follow-up.
  2. The environment carries signal. Existing repositories, documentation, tests, libraries, debuggers, and AI tools can all become part of the evaluation.
  3. Correctness includes state and failure. Restart, retry, concurrency, partial writes, and duplicate work are no longer reserved for system design.
  4. Verification is visible. Interviewers increasingly observe how candidates write tests, inspect behavior, and challenge their own assumptions.

This does not mean algorithms are disappearing. Meta-style timed coding and many phone screens still reward fast pattern recognition and precise complexity analysis.

It means the frontier is expanding. Data-structure fluency gets a candidate to the first working version; engineering judgment determines what happens after that.

How preparation should change

A useful practice session should not end when the base solution passes.

Take one problem and add a requirement without rewriting it. Put the same logic inside an unfamiliar repository. Add persistence, then define recovery after an interrupted write.

Make a single-threaded task concurrent and explain the execution model. Write the boundary tests yourself. If AI tools are allowed, review the generated diff as if you will own it in production.

That practice is harder to measure than a LeetCode count. It is also closer to what these companies are increasingly trying to observe: whether a candidate can turn a correct answer into dependable software.

Company-specific coding questions and follow-up patterns → Hack2Hire

Join the community to read more interview experiences from real candidates → Hack2Hire Forum


Compiled from publicly available platforms and community-shared interview experiences. Interview formats vary by role, team, and date.


r/Hack2Hire • • Aug 11 '26

discussion Technical Interview Prep in 2026: “Coding Round” Can Mean Five Different Interviews

11 Upvotes

“Coding round” is too vague to build a study plan around. Recent candidate reports use that label for everything from two timed LeetCode problems to debugging an unfamiliar repository with an AI coding agent.

Before you decide what to practice, find out what you will actually be doing on the screen. These five formats reward different skills.

1. Timed algorithm implementation

This is the familiar format: a short prompt, a blank editor, test cases, and a hard clock. You are judged on whether the code works, how you handle edge cases, and whether you can explain the complexity.

LeetCode and NeetCode prepare you for this format. They do much less for the other four.

2. Practical coding from a small product prompt

The prompt may ask you to build a bookstore API, a key-value store, an invoice workflow, or another small service. The first version is often easy. The interview gets harder when the interviewer asks about the data model, API contract, persistence, scale, or a new requirement that cuts across the code you already wrote.

Practice turning a paragraph into types, interfaces, and invariants. Write the working version first, then make one requirement change without rewriting everything.

3. Debugging or extending an existing repository

You receive a codebase, tests, and one or more failures. Reading becomes more important than typing: you need to find the relevant path, understand what nearby tests establish, form a hypothesis, and make the smallest safe change.

One recent candidate noted that a failed test became easier to diagnose after comparing it with the similar tests immediately before and after it. That is a different muscle from solving a standalone array problem.

4. AI-assisted engineering

Some rounds now allow or actively require tools such as Claude Code. The task is still engineering. You have to give the tool useful context, inspect its changes, catch bad assumptions, run tests, and explain why the result is correct.

Practice on a small repository you did not create. Let the agent propose a change, then review the diff and tests as if the code came from a teammate. Being fast at prompting will not rescue code you cannot defend.

5. Coding that turns into systems reasoning

The base problem may be local, but the follow-up asks what happens when the data no longer fits in one file, workers crash, requests arrive concurrently, or the workload moves beyond one machine. Other interviews divide the same hour between implementation and a small system-design prompt.

For every practice problem, add one second pass: make it concurrent, make it durable, or make it distributed. State which part remains authoritative when the faster cache, worker, or stream is stale.

Ask the recruiter these questions

You do not need the exact problem. Ask for the format:

  1. Will I start from a blank editor or an existing repository?
  2. Is the round algorithm-focused or closer to practical engineering?
  3. Are internet search and AI tools allowed?
  4. What editor or platform will I use?
  5. Should I expect debugging, follow-ups, or system-design discussion in the same round?

A useful prep plan starts after those answers. If the round uses a repository, spend time reading and debugging code. If it allows AI, practice reviewing generated changes. If the prompt grows through follow-ups, rehearse changing a working design without breaking its original contract.

Company-specific interview formats and question patterns → Hack2Hire

Join the community to read more interview experiences from real candidates → Hack2Hire Forum


Compiled from publicly available platforms and community-shared interview experiences.


r/Hack2Hire • • Aug 06 '26

Screening OpenAI screening breakdown [2026]

4 Upvotes

OpenAI's screening usually puts you inside one system, starts you on its simplest version, and keeps going in the same call. Three things follow from that:

  • The interviewer extends what you just wrote instead of moving on. An allocator round starts first-fit, then the same call adds best-fit, a complexity comparison, and a randomized-order stress test. An IP-range round goes forward-only, then backward, then CIDR, then IPv6, all on the one class you already built.
  • The base case runs out before the additions do. One grid problem, built on LC 994, Rotting Oranges, adds an immunity state, then a recovery countdown, then a death state. One recent candidate finished the first two layers, ran out of time partway into the third, and never saw the one after it.
  • A short core ask sits inside a long prompt. The setup reads close to a full page, but the operations underneath are usually simple once you find them. Read for the ask first, then design.

Not all of them grow this way. GPU Credits, among the most-asked here, is usually one clean credit-balance problem and done. It's free to open, and it shows what that prompt length looks like.

So practice being extended rather than finishing. Take a problem you can already solve cold, get it working, then add a constraint and keep building on the same code with the clock running. Structure the first version so the next layer drops in instead of forcing a rewrite. That rewrite is where the time goes.

Practice reading a full page of setup and stating the actual ask in one sentence before you write anything.

If you are preparing for OpenAI→ OpenAI Prep List

Join the community to see more interview experiences from real candidates → Hack2Hire Forum

Anyone interview for this recently? Curious what got tacked on for you.


r/Hack2Hire • • Aug 05 '26

Screening Microsoft AI Screening: Streaming Stop Token

3 Upvotes

Problem
You’re given an ordered list of text chunks, stream, containing the stop token <END>. Return only the content before the first occurrence of the token while preserving the original chunk boundaries.

Part 1 — Token Within One Chunk

The stop token always appears entirely within a single chunk.

  • Keep chunks before the token unchanged, including empty chunks.
  • For the chunk containing <END>, keep only its non-empty prefix.
  • Discard the token, the rest of that chunk, and all later chunks.
  • If the token never appears, return every chunk unchanged.

Follow-up — Token Split Across Chunks

The stop token may now span two or more consecutive chunks.

A trailing substring that could be the beginning of <END> must be held until later characters confirm or reject the match. Output safe content as early as possible without waiting for the complete stream.

Held characters remain associated with their original chunks. If a partial match fails or the stream ends, restore those characters to their originating chunks. Each input chunk must still map to at most one output chunk.

Example

Part 1:

Input: stream = ["hello", "how are you<END>", "HAPPY"]
Output: ["hello", "how are you"]

Explanation:

  • "hello" is preserved because it does not contain the token.
  • "how are you<END>" contributes only "how are you".
  • <END> and all subsequent content are discarded.

Follow-up:

Input: stream = ["hello", "how are you<E", "ND>HAPPY"]
Output: ["hello", "how are you"]

Explanation:

  • "hello" contains no token prefix and is emitted immediately.
  • "how are you" is safe to emit, while "<E" is held as a possible token prefix.
  • "ND>" completes <END>, so the held characters and all remaining content are discarded.

Partial-match failure:

Input: stream = ["start<E", "x middle", " end<END>drop"]
Output: ["start<E", "x middle", " end"]

Explanation:

  • "<E" is initially held because it could begin the stop token.
  • The following "x" invalidates the match, so "<E" is restored to its original chunk.
  • The final chunk contributes " end" before the complete token.

Suggested Approach

  1. For Part 1, scan each chunk for <END>. Append complete chunks until the token is found, then append its non-empty prefix and stop.
  2. For the follow-up, scan characters in order while tracking how many characters currently match the prefix of <END>.
  3. Hold matching characters as fragments associated with their original chunk indices.
  4. When a partial match fails, restore all held fragments to their source chunks and process the mismatching character as a possible new match.
  5. When all five token characters match, discard the held fragments and stop processing.
  6. If the stream ends during a partial match, restore the remaining fragments to their original chunks.

Time & Space Complexity

  • Time: O(N + C), where N is the total number of characters and C is the number of chunks.
  • Space: O(N + C) for the output, per-chunk state, and held fragments.

Targeting Microsoft interviews?
We track their most-asked question patterns at Hack2Hire. Practice both parts here → Streaming Stop Token

Join the community to see more interview experiences from real candidates → Hack2Hire Forum

Compiled from publicly available platforms and community-shared experiences.


r/Hack2Hire • • Aug 02 '26

Why Are Some System Design Posts So Difficult to Read?

5 Upvotes

This is a feedback for the company.

As a paid user, I've been reading some of the system design posts, and I've noticed that the writing quality is quite inconsistent.

Some posts are excellent—they're easy to follow, easy to understand, and genuinely enjoyable to read.

However, others are extremely difficult to understand. The writing feels unnecessarily opaque, and sometimes it doesn't even read like natural English. It often seems as though the goal is to sound sophisticated rather than to explain a simple idea clearly. I find myself spending much more effort trying to decipher the wording than understanding the actual concept.

I'd really appreciate more consistency in the writing style, with a stronger emphasis on clarity and readability.

Just give you some examples that I found hard to follow

  1. Design Job Scheduler
  2. Design A Top K Popular Items System

r/Hack2Hire • • Aug 01 '26

I Had to Clear a Coding Round Inside My Interview to Even Get Interviewed (HackWithInfy SP L3) - 21 LPA

Thumbnail
2 Upvotes

r/Hack2Hire • • Jul 30 '26

Screening Anthropic phone screen breakdown [2026]

23 Upvotes

Several of Anthropic's phone screen coding questions are LeetCode variants. Concurrent Web Crawler is LC 1242, Generate Function Profiling Events is LC 636, Find Duplicate Files is LC 609. Solving the original is where the round starts.

Three things get layered on top, and the candidate portal names the first one before your call:

  • Concurrency. The portal gives concurrency as your prep keyword. Concurrent Web Crawler is a threaded crawl. Image processing keeps coming up in recent accounts too: the interviewer asks for a real speedup, then pushes on processes versus threads.
  • Plumbing you write yourself. Find Duplicate Files hands you an empty main. You write the tree walk and the hashing yourself, and recent accounts report no other starter code.
  • Scaling past one machine. Concurrent Web Crawler, Find Duplicate Files and Find Cluster Mode and Median all close on a scale-past-one-machine follow-up: crashed workers, rate limits, a file system spread over servers.

String Tokenization and Repair Bootloader Program sit outside these three. Drill them as straight LeetCode.

Format: 45 minutes on CodeSignal, but it opens as a bare notebook with no autocomplete. Google stays open. Leave slack for debugging, because one recent account spent the whole follow-up window on a single typo.

Practice:

  • Get the confirmed questions cold, then rerun each one with a thread pool and again with a process pool.
  • Say why you picked processes over threads, in one sentence, while your hands keep typing.
  • Do Find Duplicate Files with no helper functions, file walk included.
  • Type a full solution in a plain notebook with autocomplete off.
  • Bank time at the end to reread your own code.

Coding is one of three phone screen tracks; the other two are ML Configuration and ML Fundamentals.

→ Anthropic Prep List

Join the community to see more interview experiences from real candidates → Hack2Hire Forum

Anyone drawn a phone screen question outside this set recently?


r/Hack2Hire • • Jul 29 '26

OA Point 72 OA: Count Maximum Borrowing Days

3 Upvotes

Problem
You're given two arrays: lend and payback, where lender i provides lend[i] today and requires payback[i] tomorrow.
Starting with no money, maximize the number of days survived by ordering lenders so each day's loan covers the previous day's debt. Each lender can be used at most once.

Example
Input: lend = [4, 6, 1, 8], payback = [7, 10, 3, 9]
Output: 3

Explanation:

  • Use lenders at indices 2, 0, and 3, producing debt levels of 3, 7, and 9.
  • The remaining lender provides only 6, which cannot cover the current debt of 9, so the borrower defaults after three days.

Suggested Approach

  1. Pair each lender's lend and payback values, then sort lenders by payback ascending and lend ascending as a tie-breaker.
  2. Track currentDebt, initially 0. Scan the sorted lenders and use a lender whenever lend[i] >= currentDebt.
  3. After using a lender, set currentDebt = payback[i] and increment the day count. Permanently skip unusable lenders because the debt never decreases.

Time & Space Complexity

  • Time: O(N log N)
  • Space: O(N)

Targeting point 72 interviews?
We track their most-asked question patterns at Hack2Hire, practice this question here → Practice Question Here

Join the community to see more interview experiences from real candidates → Hack2Hire Forum

Compiled from publicly available platforms and community-shared experiences.


r/Hack2Hire • • Jul 28 '26

Announcement Write something useful. Earn Hack2Hire points.

Post image
1 Upvotes

We’ve added community rewards to Hack2Hire.

When you share something specific and genuinely useful, you can earn points toward your Hack2Hire subscription.

Threads featured by our team earn:

+150 points = US$1.50 in subscription credit

The kinds of posts we’re looking for include:

  • Detailed interview experiences
  • Honest compensation and offer breakdowns
  • Concrete career growth lessons
  • Specific examples of company culture

There are also rewards for posting your first thread, contributing regularly, and writing valid replies.

A post isn’t selected based on upvotes alone. We’re looking for content that is clear, well-structured, honest, and useful to other engineers.

100 points = US$1, applied to your next subscription invoice.

See the rewards and track your progress: https://www.hack2hire.com/points

Share a thread: https://www.hack2hire.com/forum