sde
Interview Date
19-08-2026
Result
Selected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
Part 1: Algorithmic Problem — Backtracking & State Space Search ### Base Problem: Subsets (Power Set) Given an integer array `nums` of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Mathematically, why is the time complexity of this problem strictly bounded by $O(N \cdot 2^N)$? What does the $2^N$ represent, and what does the $N$ represent? How do you structure a recursive Depth-First Search (DFS) to build the power set using a binary decision tree? At each index `i` of the input array, what are the exact two recursive choices you must make? Explain the mechanics of the "backtrack" step: If you use a single mutable array (e.g., `current_path`) to track your state for $O(N)$ space efficiency, why is it absolutely mandatory to `pop` the last element off the array immediately after the recursive call returns? - ### Follow-Up 1: Combination Sum Given an array of distinct integers `candidates` and a target integer `target`, return a list of all unique combinations of `candidates` where the chosen numbers sum to `target`. You may choose the same number from `candidates` an unlimited number of times. In the base subsets problem, you stepped forward to index `i + 1` after making a choice. Since you can reuse the exact same element here, how do you modify your DFS state transitions to handle unlimited reuse without causing an infinite recursive loop? What is the mathematical "base case" that confirms a branch has found a valid combination, and what specific condition allows you to instantly prune a dead-end branch? To prevent returning duplicate combinations (e.g., returning both `[2, 2, 3]` and `[2, 3, 2]`), how do you restrict your recursive `for` loop so it only looks "forward" and never looks backwards at previous candidates in the array? - ### Follow-Up 2: Word Search (Grid Backtracking) Given an $M \times N$ grid of characters `board` and a string `word`, return `true` if `word` exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word. This requires running a Backtracking DFS starting from every valid cell on the 2D board. Why is maintaining a separate $O(M \cdot N)$ global `visited` boolean matrix often considered inefficient for this specific problem? To optimize space to $O(1)$ (excluding the recursion stack), you can temporarily mutate the board itself (e.g., changing `board[r][c]` to `'#'`) as you step into a cell. Why is it absolutely critical to mutate the cell *back* to its original character just before the function returns `false`? What happens if you forget this step? Explain the early-exit optimization regarding starting points: How does scanning the board and only initiating the expensive DFS when `board[r][c] == word[0]` drastically prune the search space before the backtracking even begins? - ## Part 2: AI & LLM Core Concepts (Very Light / Foundational) ### Question 1: "Needle in a Haystack" Evaluation Many modern AI companies advertise models with massive "1-Million Token Context Windows" (enough to upload multiple textbooks at once). However, independent researchers immediately test these models using a "Needle in a Haystack" benchmark. What exactly is this test measuring? Why does the physical location of the "needle" (e.g., at the very beginning, the exact middle, or the very end of the prompt) drastically affect the AI's ability to remember it? - ### Question 2: Data Poisoning (Training-Time Attacks) We previously covered "Prompt Injection," which happens during inference when a user tries to trick a live AI. **Data Poisoning** is fundamentally different—it happens during *training*. Conceptually, how could a malicious actor slowly manipulate an open-source model's worldview by purchasing expired domain names or editing Wikipedia articles before the AI company scrapes the internet for pre-training data? - ### Question 3: Overfitting & Memorization If an AI researcher trains a neural network for far too long on a very small dataset, the model will achieve 100% accuracy on its training data but completely fail when shown new, unseen data in the real world. In plain English, what is **Overfitting**? Why does the neural network effectively become a useless "lookup table" rather than an intelligent reasoning engine when this happens? - ### Question 4: Vision-Language-Action (VLA) Models for Robotics Historically, robots were programmed using strict, hard-coded physics engines and rigid spatial coordinates. Today, AI companies are building **VLA (Vision-Language-Action)** models to control physical humanoid robots using the exact same Transformer architecture as ChatGPT. Conceptually, how is this possible? How can a model that only predicts mathematical "tokens" be used to physically bend a robot's mechanical arm to pick up an apple?