Contribute OA questions
OAHelper
CompaniesProblemsTopicsInterview Experiences
Explore
G

Google

sde

Interview Date

21-08-2026

Result

Selected

Difficulty

Hard

Rounds

02

Drive Type

Off-Campus

Interview Date

21-08-2026

Result

Selected

Difficulty

Hard

Rounds

02

Drive Type

Off-Campus

Topics asked

dsa

Detailed experience

PRACTICE INTERVIEW SET 28 PART 1: ALGORITHMIC PROBLEM - OFFLINE DYNAMIC CONNECTIVITY BASE PROBLEM You are analyzing a massive, evolving computer network. You are given a graph with N nodes and a sequence of queries. Some queries add an undirected edge between two nodes, some queries remove an existing edge, and other queries ask whether node u and node v are currently in the same connected component. Task: If there were no edge deletions, you could use a standard Disjoint Set Union (DSU) structure. However, with deletions, standard DSU fails. Assuming you know all the queries in advance (an offline setting), how would you design an algorithm to answer all connectivity queries? FOLLOW-UP 1 To handle the offline dynamic connectivity efficiently, you decide to use a Segment Tree over the time domain, where each node in the tree represents a time interval. You can insert each edge's "lifespan" into O(log Q) nodes of this Segment Tree. How do you modify your DSU implementation to support traversing down this Segment Tree and "rolling back" the edge additions when you backtrack up the tree? Why must you abandon path compression and rely solely on union-by-rank for this rollback mechanism to achieve strictly O(log N) time per operation? FOLLOW-UP 2 You are implementing this time-segment tree and rollback DSU in C++ for maximum competitive performance. Dynamically allocating tree nodes and tracking state changes with std::vector or std::stack introduces too much overhead. How do you design a custom, flat-array memory layout using pre-allocated arrays and a simple integer pointer for the rollback stack to guarantee contiguous memory access and maximize L1/L2 CPU cache hit rates? PART 2: SYSTEM DESIGN - MULTI-TENANT EDGE INFERENCE BACKEND BASE PROBLEM You are architecting a real-time anomaly detection platform. Thousands of edge devices (like cameras or sensors) run lightweight local models. When an anomaly is detected, the edge device extracts a metadata payload and sends it to your centralized cloud backend. Design a multi-tenant REST backend that can ingest these high-throughput anomaly events, route them to the correct tenant's isolated data silo, and serve real-time dashboard queries to end-users. FOLLOW-UP 1 The edge devices rely on low-power hardware. To achieve real-time throughput, the local C++ inference engine must bypass the standard CPU instruction execution path. How do you design the edge software architecture to natively integrate with hardware accelerators using frameworks like OpenCL, ensuring that memory transfers between the host CPU and the accelerator device do not become a bottleneck? FOLLOW-UP 2 Security is a primary concern for the multi-tenant REST backend. You must ensure zero-knowledge data isolation, meaning the central server cannot read the raw anomaly metadata. How do you implement a cryptographic architecture where edge devices encrypt payloads using tenant-specific public keys, and tenant dashboards decrypt them on the client side, while still allowing the backend to route and store the data efficiently? PART 3: AI / HARDWARE DISCUSSION QUESTIONS What are the architectural advantages of RISC-V for custom AI accelerators? RISC-V is an open standard Instruction Set Architecture (ISA) that allows for deep customizability. Unlike proprietary ISAs, engineers can strip out unnecessary instructions and add custom vector or matrix-multiplication extensions specifically tailored for deep learning workloads. This allows for the creation of highly specialized, low-power silicon that executes inference pipelines with minimal silicon real estate and maximum power efficiency. How do CPU pipeline hazards impact high-performance inference code? In tight loops computing matrix multiplications, pipeline hazards (structural, data, and control hazards) can cause the CPU pipeline to stall, wasting clock cycles. For example, a data hazard occurs when an instruction depends on the result of a still-executing previous instruction. High-performance C++ inference engines mitigate this by utilizing loop unrolling, software pipelining, and precise instruction scheduling to keep the ALU fully saturated without bubbling the pipeline. What is the role of the Cache Memory Hierarchy (L1/L2/L3) in LLM inference? LLM inference is heavily memory-bound rather than compute-bound. Moving model weights from main memory (DRAM) to the ALU takes significantly longer than the actual mathematical computation. The cache hierarchy bridges this gap. Optimizing inference requires formatting the tensors and utilizing block-wise matrix multiplication algorithms (like FlashAttention) so that data perfectly fits within the ultra-fast L1 and L2 SRAM caches, minimizing expensive round-trips to main memory. How does Virtual Memory Translation overhead affect memory-intensive applications, and how is it mitigated? When a C++ application accesses memory, the CPU must translate the virtual address to a physical address by walking a multi-level Page Table. In memory-intensive applications like massive graph processing or large model inference, this translation causes frequent Translation Lookaside Buffer (TLB) misses, stalling the CPU. This is mitigated by configuring the operating system to use HugePages (e.g., 2MB or 1GB pages instead of the standard 4KB), which drastically reduces the size of the page table and increases the TLB hit rate.

Posted on - 23 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.