sde
Interview Date
03-08-2026
Result
Selected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
PART 1: ALGORITHMIC PROBLEM - DYNAMIC PERMISSION GRAPHS BASE PROBLEM You are building the authorization engine for a multi-tenant backend. Users and resources are nodes in a massive graph. You are given a stream of operations: some operations grant user A access to user B's resources (adding an undirected edge), and other operations ask if user X has a path to access user Y's resources. Task: Design an algorithm to process these connection and query operations in near O(1) time. What data structure effectively handles these dynamic connectivity queries, and how do you implement path compression and union by rank to ensure optimal time complexity? FOLLOW-UP 1 The security requirements have changed. Administrators can now revoke permissions, meaning edges in your graph can be deleted. Standard path-compressed structures do not support edge deletion efficiently. How would you restructure your algorithm to handle a mix of edge insertions, deletions, and connectivity queries (e.g., using an offline divide-and-conquer approach over time, or a Link-Cut Tree)? FOLLOW-UP 2 You need to implement this system in a high-performance backend. The number of nodes is in the billions, making a standard pointer-based tree structure highly cache-inefficient and prone to memory fragmentation. How do you design a custom flat-array memory layout and avoid standard library overhead to keep traversal strictly within L1/L2 CPU caches? PART 2: SYSTEM DESIGN - ZERO-KNOWLEDGE MULTI-TENANT BACKEND BASE PROBLEM You are designing a secure, multi-tenant REST backend for a data vault service. The core requirement is a "Zero-Knowledge" architecture: the server must route, store, and retrieve payloads for millions of users across different tenant organizations, but the server itself must never be able to decrypt or read the data. Design the high-level architecture, focusing on the encryption flow, authentication, and payload storage. FOLLOW-UP 1 An employee at a tenant organization is fired, and their access must be revoked immediately. In a zero-knowledge system, the server doesn't hold the decryption keys, so how do you design a secure key-exchange and revocation mechanism (like Key Encrypting Keys or proxy re-encryption) that prevents the fired employee from accessing the data without requiring all other users to re-encrypt the entire database? FOLLOW-UP 2 To maximize throughput, processing thousands of concurrent REST API requests using a standard thread-per-connection model is consuming too much memory and causing context-switching overhead. How would you re-architect the network layer to use asynchronous, event-driven I/O (such as epoll or io_uring) and thread pools to handle millions of concurrent connections efficiently? PART 3: AI / ML DISCUSSION QUESTIONS How can you serve personalized LLMs to multiple tenants efficiently? Serving a completely separate large language model for every tenant is cost-prohibitive. Instead, systems use parameter-efficient fine-tuning like LoRA (Low-Rank Adaptation). A single, massive foundational base model is loaded into GPU memory, and small, tenant-specific LoRA weights (adapters) are dynamically swapped in and out of VRAM for each request. This allows multi-tenant personalization with near-zero latency overhead. What is Differential Privacy in the context of AI training? Differential privacy is a mathematical framework that ensures an AI model does not memorize or leak the exact private data points it was trained on. It typically involves adding carefully calibrated statistical noise (like Gaussian noise) to the gradients during the training process (e.g., DP-SGD). This guarantees that the model learns general patterns but cannot be reverse-engineered to extract a specific user's sensitive information. What are Trusted Execution Environments (TEEs) or Secure Enclaves in AI? TEEs are secure, hardware-isolated areas within a processor (like Intel SGX or AMD SEV) that protect data and code currently in use. In AI, they allow a tenant to send sensitive data to a cloud provider for inference, ensuring that even the cloud provider's root administrators or hypervisor cannot view the data, the prompt, or the model weights during execution. What is the difference between Zero-Shot, One-Shot, and Few-Shot Prompting? These terms refer to how many examples of the desired output are provided to the model within the prompt. Zero-Shot provides no examples, relying entirely on the model's pre-trained knowledge. One-Shot provides exactly one example of the input-output pair to establish format. Few-Shot provides a small number of diverse examples (typically 3 to 10) to guide the model's reasoning pattern and stylistic constraints, significantly improving accuracy on complex logic tasks.