Contribute OA questions
OAHelper
CompaniesProblemsTopicsInterview Experiences
Explore
G

Google

SDE

Interview Date

31-08-2026

Result

Rejected

Difficulty

Medium

Rounds

03

Drive Type

Off-Campus

Interview Date

31-08-2026

Result

Rejected

Difficulty

Medium

Rounds

03

Drive Type

Off-Campus

Topics asked

DSA

Detailed experience

PART 1: ALGORITHMIC PROBLEM - SQUARE ROOT DECOMPOSITION & MO'S ALGORITHM BASE PROBLEM You are analyzing a massive array of integer network identifiers (size `N <= 10^5`). You are given `Q` offline queries (where `Q <= 10^5`), each asking for the number of strictly distinct identifiers within a subarray `[L, R]`. Task: Since there are no updates, you can process the queries in any order. How do you implement Mo's Algorithm—conceptually dividing the array into blocks of size `sqrt(N)` and sorting the queries by block index, then by the `R` pointer—to maintain a sliding window frequency map and answer all `Q` queries in strictly O((N + Q) * sqrt(N)) time? FOLLOW-UP 1 The network administrators suddenly introduce dynamic updates to the array. Interleaved with the `Q` range queries, you now receive point updates (e.g., "Change the identifier at index `idx` to `val`"). Standard Mo's Algorithm breaks because the array mutates over time. How do you expand your two-pointer sliding window into a 3D state space `(L, R, Time)`, effectively tracking a third "Time" pointer to apply and rollback updates on the fly? What is the optimal block size to ensure the time complexity is tightly bounded at O(Q * N^(2/3))? FOLLOW-UP 2 The data structure changes from a flat array to a hierarchical network topology represented as a Tree (with `N` nodes). The queries now ask for the number of distinct identifiers on the simple path between node `u` and node `v`. You cannot run Mo's Algorithm directly on a graph. How do you use the Euler Tour technique (tracking the "entry" and "exit" times of every node via DFS) to flatten the entire tree into a 1D array of size `2N`? Specifically, how do you map the path between `u` and `v` onto this array (handling the Lowest Common Ancestor separately) to perfectly reuse your 1D Mo's Algorithm logic? ------------------------------------------------ PART 2: SYSTEM DESIGN - DISTRIBUTED TRACING PLATFORM BASE PROBLEM You are designing a distributed tracing and telemetry platform (similar to Jaeger or Zipkin) for an enterprise microservices architecture. The system must monitor 5,000 internal services, ingesting billions of spans (individual units of work) per day. Design the high-level architecture to ingest the spans via UDP/gRPC, assemble them into complete causal traces using `trace_id` and `parent_span_id`, and provide a search API to visualize the entire request lifecycle. FOLLOW-UP 1 Ingesting and storing 100% of all trace data generates petabytes of storage, 99.9% of which represents boring, successful "200 OK" requests. You must aggressively sample the data to save costs, but standard "Head-Based Sampling" (flipping a coin at the API Gateway to keep or drop the trace) often misses rare, deep-system anomalies. How do you design a "Tail-Based Sampling" architecture, where collectors buffer all spans in memory for a short window and only flush the entire trace to persistent storage if a downstream service eventually reports an error or breaches a latency threshold? FOLLOW-UP 2 The microservices utilize heavily asynchronous message queues (e.g., Kafka). A frontend service publishes an event, and three hours later, a batch worker consumes it. Standard HTTP header context propagation completely fails here, as the initial HTTP request has long since terminated. How do you design asynchronous context propagation (injecting telemetry data into the Kafka payload headers), and how does the tracing backend UI conceptually link a single upstream user click to a massive "fan-out" of hundreds of worker traces executed hours later? ------------------------------------------------ PART 3: AI / LLM DISCUSSION QUESTIONS Explain the mathematical intuition behind Rotary Positional Embeddings (RoPE). How does encoding absolute token positions using rotation matrices in the complex plane naturally yield the *relative* distance between tokens when computing the dot product in the self-attention layer? In the context of disaggregated LLM architectures (where the Prefill phase runs on one GPU cluster and the Decode phase runs on another to maximize throughput), what is the "KV-Transfer Bottleneck," and how do systems manage the massive network I/O required to migrate the KV Cache state across the network? What is "Kahneman-Tversky Optimization" (KTO) in LLM alignment, and how does its reliance on an un-paired dataset (where responses are independently labeled as simply "good" or "bad" based on a utility function) fundamentally change the data collection pipeline compared to the strict paired-preference requirements of DPO (Direct Preference Optimization)? How do multi-agent debate frameworks (like Swarm or Magentic-One) mechanically reduce hallucination rates during complex reasoning tasks? Why does forcing distinct LLM personas to cross-verify each other's intermediate scratchpads prevent the propagation of logical errors better than a single-agent Chain-of-Thought?

Posted on - 25 Sept 2026
Company OAsAll ProblemsTopicsCompany InsightsOA CalendarInterview ExperiencesPremium
OAHelper

Built by students, for students - practice company-specific OAs, DSA sheets, and real interview experiences to land your dream role.

© 2026 OAHelper.in·Terms·Privacy·Refunds·Trust & Safety·Contact·
Ready to crack your next OA?

Practice company-specific questions trusted by thousands of students across India.

Start PracticingGo Premium
OA Practice·DSA·Placements

Disclaimer: OAHelper is an independent educational platform. We (oahelper.in) do not own the images or questions shown. Content is uploaded by users.