sde
Interview Date
10-08-2026
Result
Selected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
PART 1: ALGORITHMIC PROBLEM - FAST FOURIER TRANSFORM (FFT) & NUMBER THEORETIC TRANSFORM (NTT) BASE PROBLEM You are building an advanced pattern recognition engine for a bioinformatics system. You need to find all occurrences of a pattern string `P` (length `M`) in a massive text string `T` (length `N`, where `N <= 10^6`). However, the pattern contains "wildcard" characters (`?`) that can match absolutely any character. Task: Standard KMP or Z-algorithms fail entirely because the transitive property of equality breaks down with wildcards (if A=? and B=?, A does not necessarily equal B). How do you model this string matching problem as the multiplication of two polynomials, and how do you use the Fast Fourier Transform (FFT) to compute the convolution and find all valid match indices in strictly O(N log N) time? FOLLOW-UP 1 The bioinformatics system requires perfect precision. Standard FFT uses complex numbers and floating-point arithmetic (`double`), which introduces catastrophic precision loss and rounding errors for massive polynomials, leading to false positive matches. How do you transition the algorithm to use the Number Theoretic Transform (NTT)? Explain how you replace the complex roots of unity with integer primitive roots modulo a large prime (e.g., 998244353), completely eliminating floating-point math and guaranteeing exact integer arithmetic for the convolution. FOLLOW-UP 2 To deploy this engine in a high-throughput C++ real-time processing pipeline, the O(N log N) NTT operation is still too slow due to memory latency. How do you optimize the nested loops of the NTT "Butterfly" operations? Specifically, detail how you utilize bit-reversal permutation arrays to process the transform iteratively (in-place) to maximize L1 cache hits, and how you apply SIMD CPU instructions (like AVX2 or AVX-512) to execute 8 to 16 modular multiplications simultaneously in a single clock cycle. ------------------------------------------------ PART 2: SYSTEM DESIGN - HIGH-PERFORMANCE OBJECT STORAGE (AMAZON S3) BASE PROBLEM You are designing a highly durable, distributed Object Storage system (similar to Amazon S3) to store exabytes of unstructured data (images, videos, backups). Design the high-level architecture separating the Metadata Control Plane (storing object keys, bucket policies, and mapping logic) from the Data Plane (storing the actual binary blobs). Explain why the Data Plane relies on Erasure Coding (e.g., Reed-Solomon 10+4) instead of standard 3x Replication, and mathematically how Erasure Coding achieves 11 nines (99.999999999%) of durability with vastly lower storage overhead. FOLLOW-UP 1 Users frequently upload massive 5-Terabyte video files. A single TCP connection dropping at 99% would force the user to restart a 4.9TB upload. How do you design a Multipart Upload API? Detail the orchestration required: how the client chunks the file, how the system temporarily stores uncommitted parts, how the final `CompleteMultipartUpload` request mathematically verifies the data integrity using a Merkle Tree (or a concatenated MD5 ETag), and how background garbage collection handles abandoned incomplete uploads. FOLLOW-UP 2 At the lowest level, the C++ storage daemons are bottlenecked by the Linux Kernel. When a user requests a file, the OS copies bytes from the NVMe SSD into kernel space, then to user space, then back to kernel space for the network socket, destroying CPU utilization and memory bandwidth. How do you design a zero-copy data path? Detail the use of `io_uring` for asynchronous, lock-free disk I/O, combined with the `sendfile()` system call (or Kernel-Bypass using DPDK - Data Plane Development Kit) to stream the object bytes directly from the page cache to the Network Interface Card (NIC), entirely bypassing user-space memory. ------------------------------------------------ PART 3: AI / LLM DISCUSSION QUESTIONS In the context of LLM Post-Training Quantization (PTQ), what is the specific mathematical intuition behind AWQ (Activation-aware Weight Quantization)? How does AWQ use the activation distribution of a calibration dataset to identify and protect the top 1% "salient weights" (keeping them in FP16) while aggressively quantizing the remaining 99% to INT4 without degrading model perplexity? When scaling distributed training across a massive GPU cluster, what is the "Bubble Time" in Pipeline Parallelism (such as the GPipe or 1F1B schedules)? How do micro-batching schedules mathematically interleave the forward and backward passes across different pipeline stages to minimize this idle GPU time? Explain the architectural challenges of "KV Cache Eviction" during long-context generation. How do frameworks like H2O (Heavy-Hitter Oracle) dynamically differentiate between "Local Tokens" (recent context) and "Heavy Hitter Tokens" (syntactic anchors with high accumulated attention scores) to drop up to 80% of the KV cache without causing the LLM to hallucinate? In modern deep Transformer initialization (e.g., DeepNorm or Admin), why do standard initialization techniques (like Xavier or Kaiming) fail as the network scales beyond 100 layers? How do these advanced techniques mathematically scale the residual connections and projection weights prior to Layer Normalization to prevent the gradients from vanishing or exploding during the critical first 100 warmup steps?