Tech Mahindra OA | Run-Length String Compression & Single Unique Element Using XOR

Question · Posted Jun 2026

Problem 1 - Telemetry Data Payload Compressor Problem Statement You are working on an optimization engine for a satellite telemetry receiver. The system receives a string telemetryStream consisting only of uppercase and lowercase English letters. To reduce transmission bandwidth, consecutive occurrences of the same character must be compressed into the character followed by its frequency count. For example: "AAABBC" becomes "A3B2C1" Return the compressed string. Constraints Constraint 1 ≤ telemetryStream.length ≤ 105 Test Case Input Output AAABBC A3B2C1 Explanation The ...

The full answer & interview discussion are available to premium members.

Log in Create a free account