Twilio OA 2025 | String Compression, Rate Limiting & BFS Routing
Question · Posted Jun 2026
Problem 1 - SMS Payload Compression Engine Problem Statement You are building a microservice that compresses SMS payloads before transmission. You are given a string smsText consisting of lowercase English letters and spaces. To compress the payload: Remove all whitespace characters. Remove consecutive duplicate letters while keeping only the first occurrence. For example: "aa a" → remove spaces → "aaa" → compress duplicates → "a" Return the final compressed string. Constraints Constraint 1 ≤ smsText.length ≤ 105 Test Cases Input ...
The full answer & interview discussion are available to premium members.
Log in Create a free account