SDE
Interview Date
26-08-2026
Result
Rejected
Difficulty
Medium
Rounds
02
Drive Type
Off-Campus
Topics asked
Detailed experience
PART 1: ALGORITHMIC PROBLEM - SOCIAL NETWORK CONNECTIONS BASE PROBLEM You are analyzing data for a social network. You are given an integer 'N' representing the number of users (IDs from 0 to N-1), and a 2D array of 'friendships' where friendships[i] = [userA, userB] indicates an undirected friendship between two users. Task: Write a function to determine the "degree of separation" between a 'source' user and a 'target' user. The degree of separation is the shortest path of friendships connecting them. If they are not connected at all, return -1. FOLLOW-UP 1 The product team wants to build a "Friend Suggestions" feature. A good suggestion for User A is someone who is NOT currently friends with User A, but who shares the maximum number of mutual friends with User A. Task: Write an algorithm to return the top 'K' friend suggestions for a given user. What data structures will you use to efficiently count mutual friends, and what is the time complexity of your approach? FOLLOW-UP 2 The social network has grown to billions of users and trillions of friendship connections. The adjacency list for the graph can no longer fit in the memory (RAM) of a single server. Task: How do you scale this system? Discuss how you would partition (shard) the graph data across multiple servers. If you partition by UserID, how does your algorithm from Follow-Up 1 change when checking mutual friends requires querying data that lives on completely different servers? PART 2: AI DISCUSSION & TERMINOLOGY Practical Application & Testing: When using an AI assistant to help write unit tests for your code, how do you ensure the AI doesn't just write "happy path" tests that pass easily? How do you prompt it to actively find edge cases and vulnerabilities? General Knowledge: In the context of AI development, what is the tension between "Capabilities" (making the model smarter and more powerful) and "Alignment" (making the model safe and predictable)? Basic Terminologies (Briefly explain the following concepts): Synthetic Data: Training data that is generated artificially by another AI model, rather than being collected from human writing or real-world events. As developers run out of high-quality human text on the internet, synthetic data is becoming crucial for training the next generation of models. Gradient Descent: The core mathematical optimization algorithm used to train neural networks. It works by calculating the model's errors (the "loss") and iteratively adjusting the internal parameters downward along a slope (the "gradient") to minimize those errors. Few-Shot Prompting: A technique where you provide the AI with a small number of examples (usually 2 to 5) inside the prompt before asking your actual question. This helps establish a strict pattern, tone, or formatting rule that the AI will follow in its answer. Red Teaming: A security and safety practice where a group of human testers (the "red team") intentionally tries to hack, trick, or break an AI model by feeding it malicious or complex prompts. The goal is to discover vulnerabilities before the model is released to the public.