Contribute OA questions
OAHelper
CompaniesProblemsTopicsInterview Experiences
Explore
G

Google

sde

Interview Date

19-08-2026

Result

Rejected

Difficulty

Medium

Rounds

03

Drive Type

Off-Campus

Interview Date

19-08-2026

Result

Rejected

Difficulty

Medium

Rounds

03

Drive Type

Off-Campus

Topics asked

dsa

Detailed experience

PART 1: ALGORITHMIC PROBLEM - IMPLICIT TREAPS & LAZY PROPAGATION BASE PROBLEM You are modeling a highly volatile sequence of $N$ genomic markers (where $N \le 10^5$). Task: You must support an operation to reverse a contiguous subsegment of the sequence: `reverse(L, R)`. A standard array or linked list requires $O(R - L)$ time per reversal, which will result in a Time Limit Exceeded (TLE) error over $Q$ queries. How do you design an Implicit Treap (a randomized Cartesian Tree where the keys are implicit array indices) to split the tree into three components $([1, L-1], [L, R], [R+1, N])$, apply the reversal, and merge them back together in strictly $O(\log N)$ time? FOLLOW-UP 1 The genomic sequence operations expand. Interleaved with the `reverse(L, R)` operations, you must now support range additions `add(L, R, X)` (adding a specific mutation value to all elements in the range) and range queries `query_sum(L, R)`. How do you implement Lazy Propagation on the Implicit Treap? Specifically, detail the exact sequence of operations inside the `push()` (or `propagate()`) function. How do you ensure that pending reversals and additions are pushed down to the children in the correct order before any `split` or `merge` operation mutates the tree structure? FOLLOW-UP 2 The sequence tracker is ported to a high-frequency C++ execution engine. The standard Treap implementation allocates new nodes dynamically and relies heavily on pointer manipulation, which completely fragments the heap and destroys L1 CPU cache locality, slowing down the $O(\log N)$ traversal. How do you design a static, allocation-free Memory Pool (Slab Allocator) for the Treap using a single `std::vector`? Detail how you implement a "freelist" stack to recycle indices of deleted nodes in $O(1)$ time, replacing all 64-bit memory pointers with 32-bit integer indices to pack the Node struct into a cache-line-friendly layout. ------------------------------------------------- PART 2: SYSTEM DESIGN - DISTRIBUTED LOCK MANAGER (DLM) BASE PROBLEM You are designing a Distributed Lock Manager (similar to Apache ZooKeeper or etcd) to coordinate leader election and resource locking for 100,000 microservice instances. Design the high-level architecture. Explain how a cluster of 5 nodes utilizes a consensus algorithm (like Raft or Paxos) to maintain a strongly consistent, replicated State Machine of active locks. How does the system guarantee that a network partition dividing the cluster into a group of 3 and a group of 2 does not result in split-brain lock assignments? FOLLOW-UP 1 A microservice client acquires an exclusive lock on a critical database file. Suddenly, the client process experiences a massive 45-second "Stop-the-World" Garbage Collection pause. The DLM assumes the client has died, expires its session, and grants the lock to a second client. The first client finally wakes up, completely unaware of the pause, believes it still holds the lock, and initiates a write, corrupting the file alongside the second client. How do you design a "Fencing Token" mechanism—where the DLM issues a monotonically increasing integer with every lock grant—and how must the downstream database validate this token to mathematically prevent this distributed concurrency failure? FOLLOW-UP 2 Under extreme write-heavy workloads, the Leader node in the Raft cluster becomes a severe disk I/O bottleneck. The consensus protocol strictly dictates that the Leader must successfully `fsync` every lock acquisition to its persistent Write-Ahead Log (WAL) on disk before broadcasting it to the Followers. How do you optimize the storage engine of the Leader node? Detail how implementing "Group Commit" (batching multiple client requests into a single `fsync` system call) and isolating the WAL on a dedicated NVMe SSD—bypassing the OS page cache using `O_DIRECT`—drastically maximizes IOPS and reduces lock-grant latency. ------------------------------------------------- PART 3: AI / LLM DISCUSSION QUESTIONS In the context of Retrieval-Augmented Generation (RAG), how does the ColBERT (Contextualized Late Interaction) architecture differ fundamentally from standard single-vector Dense Passage Retrieval (DPR)? Specifically, how does ColBERT's MaxSim operator preserve token-level granularity during the similarity search while remaining computationally feasible at scale? When developing custom CUDA kernels for LLM attention mechanisms (e.g., FlashAttention), calculating the Softmax denominator (the sum of exponentials) requires a global reduction across the entire sequence length. How do algorithmic tiling strategies use online Softmax equations to maintain mathematical equivalence across independent thread blocks without requiring an expensive global memory synchronization barrier? Explain the mechanical differences between standard autoregressive decoding and "Lookahead Decoding" (or Jacobi Decoding). How does the latter generate multiple tokens simultaneously in parallel without relying on a separate, smaller draft model (unlike Speculative Decoding)? In the context of autonomous AI Agents, what is the architectural distinction between standard ReAct (Reason+Act) prompting and the Toolformer training paradigm? How does Toolformer use self-supervised API calls during the fine-tuning phase to internalize tool usage directly into the model's weights, rather than relying on brittle in-context instructions?
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.