SDE
Interview Date
22-08-2026
Result
Selected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
## Question 1: File Block Compaction Concepts:** Sliding Window, Two Pointers Problem Statement:** You are given an array of integers `filesize` and a binary array `is_fragmented` (represented as `0`s and `1`s) of the same length `n`. You want to group files together into a single contiguous block. A block is considered valid if it contains at most `k` fragmented files (where `is_fragmented[i] == 1`). Return the maximum total size of files (sum of `filesize`) you can gather in a single valid contiguous block. Test Case:** *Input:** `filesize = [10, 20, 15, 30, 5]`, `is_fragmented = [0, 1, 1, 0, 1]`, `k = 1` *Output:** `45` - ## Question 2: Bounded Zero-Sum Subsegments Concepts:** Prefix Sum, Hash Map, Array Splitting Problem Statement:** You are given an array of integers `transactions` representing daily money transfers (positive for deposits, negative for withdrawals) and an integer `limit`. A continuous subsegment of transactions is considered "stable" if the total sum of the transactions within it is exactly `0`, AND the absolute value of every individual transaction in the subsegment is at most `limit`. Return the length of the longest stable subsegment. Test Case:** *Input:** `transactions = [5, -2, 2, 1, -3, 2, -2, 4]`, `limit = 3` *Output:** `3`