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 Programming (Knapsack & Subset Sum) ### Base Problem: Partition Equal Subset Sum Given an integer array `nums`, return `true` if you can partition the array into two subsets such that the sum of the elements in both subsets is equal. Why does mathematically proving that the total sum of the array must be an even number instantly act as your first base-case check? If the target sum for one subset is exactly `sum(nums) / 2`, how does this problem perfectly map to the classic **0/1 Knapsack Problem**? Explain the state transition in a 1D DP array `dp[j]`. As you iterate through each number in `nums`, why must you traverse the `dp` array **backwards** (from `target` down to `num`) to avoid using the same number more than once? - ### Follow-Up 1: Coin Change (Unbounded Knapsack) You are given an integer array `coins` representing coins of different denominations and an integer `amount` representing a total amount of money. Task:** Return the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return `-1`. You may assume that you have an infinite number of each kind of coin. While this still uses a 1D DP array where `dp[j]` represents the minimum coins needed for amount `j`, this is an **Unbounded Knapsack** problem because you can reuse elements. How do you alter the inner loop traversal direction from the Base Problem to allow a single coin denomination to be reused multiple times in the same amount calculation? When initializing your DP array, why is it critical to fill it with a placeholder like `infinity` (or `amount + 1`) rather than `0`? How does `dp[0] = 0` serve as the absolute foundation for the `min()` transition function? - ### Follow-Up 2: Target Sum You are given an integer array `nums` and an integer `target`. You want to build an expression out of `nums` by adding one of the symbols `'+'` and `'-'` before each integer in `nums` and then concatenate all the integers. Task:** Return the number of different expressions that you can build, which evaluates to `target`. A naive backtracking approach takes $O(2^N)$ time. How can you use math to reduce this to another subset sum DP problem? Let $P$ be the sum of positive elements and $N$ be the absolute sum of negative elements. Since $P - N = \text{target}$ and $P + N = \text{sum(nums)}$, what is the $O(1)$ formula to isolate $P$? If `target + sum(nums)` is odd, or if `target > sum(nums)`, what does that instantly tell you about the possibility of reaching the target? Instead of storing a boolean `true`/`false` like in the Base Problem, your 1D DP array now stores integer counts. Explain the additive transition `dp[j] = dp[j] + dp[j - num]`. - ## Part 2: AI & LLM Core Concepts (Very Light / Foundational) ### Question 1: The KV Cache Bottleneck Recent 2026 AI infrastructure advancements (like Google's TurboQuant or SK Hynix's SALT-KV) focus intensely on compressing and tiering the **KV (Key-Value) Cache**. Why has the KV cache specifically become the ultimate hardware bottleneck for modern AI? As context windows grow to millions of tokens and agentic workflows run continuously, why does memory capacity become a harder limit than raw GPU compute speed? - ### Question 2: Test-Time Compute (Reasoning Tokens) Models designed for deep reasoning utilize massive amounts of "Test-Time Compute" before outputting an answer. While this sounds like standard Chain of Thought (CoT), these models use hidden "Reasoning Tokens." What is the conceptual difference between a model generating internal reasoning tokens versus just typing *"Let's think step by step"* to the user? Why might the AI deliberately hide its scratchpad from the final output? - ### Question 3: Knowledge Distillation Open-source 8-Billion parameter models today often outperform massive 175-Billion parameter models from a few years ago. Much of this efficiency is achieved through **Knowledge Distillation**. In plain English, how do AI developers use a massive, expensive "Teacher" model (like GPT-4) to train a tiny, fast "Student" model without forcing the student to read the entire internet from scratch? - ### Question 4: Semantic Routing When building complex enterprise AI applications, developers often place a **Semantic Router** at the very beginning of the pipeline. If a user types a prompt into a customer service bot, how does a Semantic Router instantly decide whether to send the prompt to a massive expensive model, a cheap fast model, or a hard-coded database—all without generating a single word of text itself?