sde
Interview Date
31-08-2026
Result
Selected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
Part 1: Algorithmic Problem — Greedy Algorithms & Array Traversal ### Base Problem: Jump Game You are given an integer array `nums`. You are initially positioned at the array's first index, and each element in the array represents your **maximum** jump length at that position. Task:** Return `true` if you can reach the last index, or `false` otherwise. Why does a standard Backtracking or DFS approach (exploring every possible jump size from every position) lead to an exponential $O(2^N)$ time complexity? How do you implement a **Greedy** approach to solve this in strictly $O(N)$ time and $O(1)$ space? Explain how maintaining a single integer variable (`max_reachable_index`) and updating it as you iterate through the array elegantly solves the problem. - ### Follow-Up 1: Jump Game II (Minimum Jumps) You are given a similar 0-indexed array of integers `nums`. You are guaranteed that you can always reach the last index. Task:** Return the **minimum** number of jumps required to reach the last index. Why is this problem conceptually identical to a Breadth-First Search (BFS) where each "level" of the BFS is the range of indices you can reach with your current number of jumps? How do you optimize this into an $O(N)$ array traversal without actually allocating a Queue data structure? Explain the logic of keeping track of your `current_jump_end` and `farthest_reachable` limits, and why you only increment your jump counter when your loop index `i` hits the `current_jump_end`. - ### Follow-Up 2: Gas Station There are $N$ gas stations along a circular route, where the amount of gas at the $i$-th station is `gas[i]`. You have a car with an unlimited gas tank, and it costs `cost[i]` of gas to travel from the $i$-th station to its next `(i + 1)`-th station. You begin the journey with an empty tank at one of the gas stations. Task:** Given two integer arrays `gas` and `cost`, return the starting gas station's index if you can travel around the circuit once in the clockwise direction, otherwise return `-1`. What is the mathematical proof that if the sum of all `gas` is strictly less than the sum of all `cost`, it is fundamentally impossible to complete the circuit? If you start at station `A` and run out of gas at station `B`, explain the greedy intuition behind why it is completely useless to try starting at *any* station between `A` and `B`. How does this realization allow you to find the correct starting station in exactly one pass ($O(N)$ time)? - ## Part 2: AI & LLM Core Concepts (Very Light / Foundational) ### Question 1: Frequency and Presence Penalties When developers configure an API call to an LLM (like OpenAI's), they often see parameters called **Frequency Penalty** and **Presence Penalty**. In plain English, what do these two dials do? If a model is stuck in a repetitive loop saying the exact same sentence over and over, which penalty would you increase to force it to talk about something else? - ### Question 2: Model Distillation (Teacher and Student) You will often hear about smaller open-source models being trained via "Model Distillation." What does this mean? In simple terms, how do researchers use a massive, slow, and expensive "Teacher" model (like GPT-4) to train a tiny, fast "Student" model that can run on a smartphone? - ### Question 3: Traditional OCR vs. Vision-Language Models Before the modern AI boom, software used OCR (Optical Character Recognition) to read receipts and documents. Today, developers use Multimodal Vision-Language Models (like GPT-4o). What is the practical difference? Why is an AI Vision model infinitely better at processing a messy, hand-drawn flowchart than a traditional OCR engine? - ### Question 4: Data Poisoning In the realm of AI cybersecurity, what is a **Data Poisoning** attack? If a massive tech company is scraping billions of images and websites from the public internet to train their next model, how might malicious actors weaponize their own websites to intentionally corrupt the AI's future behavior?