SDE
Interview Date
21-08-2026
Result
Selected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
## Question 1: Minimum Cost to Prevent Triplets Concepts:** Greedy, String Manipulation Problem Statement:** You are given a string `s` of length `n` and an array of integers `cost` of the same length, where `cost[i]` represents the cost of deleting the character `s[i]`. Your task is to delete characters from `s` such that no three consecutive characters are identical. Return the minimum total cost to achieve this. Test Case:** *Input:** `s = "aaabaaac"`, `cost = [1, 2, 3, 4, 5, 6, 7, 8]` *Output:** `6` - ## Question 2: Palindromic Network Capacity Concepts:** Two Pointers, Greedy Problem Statement:** You are given an array of integers `capacity` representing the data processing limits of a row of adjacent servers. You want the network's capacity profile to be a palindrome (reading the same forwards and backwards). In a single operation, you can merge any two adjacent servers `i` and `i+1`, replacing them with a single server of capacity `capacity[i] + capacity[i+1]`. Return the minimum number of merge operations required to make the capacity array palindromic. Test Case:** *Input:** `capacity = [2, 1, 5, 2, 1]` *Output:** `2`