Better Compression
Reported by candidates from Atlassian's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Atlassian's Better Compression question hit candidates in March 2024 and it's a string manipulation problem dressed up as a compression challenge. You're likely looking at a scenario where you need to encode or decode a string more efficiently than a naive approach. This is the kind of problem that sounds simple until you realize the trick hiding in the edge cases. StealthCoder will catch the pattern if you blank on the optimal strategy during the live OA.
Pattern and pitfall
Better Compression is fundamentally about finding a pattern in how strings can be compacted or expanded. The common trap is trying to brute-force every possible compression without recognizing that the problem wants you to find the shortest or most efficient encoding. Usually these questions hinge on counting consecutive characters, run-length encoding, or identifying repeating substrings. The algorithmic insight is often greedy: process left to right, commit to a decision, and trust that local optimization builds the global answer. During the live OA, if you freeze on whether to use a hash table or iterate through segments, StealthCoder serves as your safety net to confirm the approach.
If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.
You can drill Better Compression cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.
Get StealthCoderRelated leaked OAs
This OA pattern shows up on LeetCode as string compression. If you have time before the OA, drill that.
You've seen the question.
Make sure you actually pass Atlassian's OA.
Atlassian reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Better Compression FAQ
Is this a run-length encoding problem?+
Likely. Run-length encoding compresses 'aaabba' to '3a2b1a'. The twist with Atlassian is usually in the output format or whether you're decoding instead of encoding. Check the examples closely for the exact compression rules.
Do I need to try all possible compressions and pick the shortest?+
No. That's a brute-force trap. The problem almost certainly has a deterministic rule. Read the problem statement for the exact compression algorithm, then implement it once correctly. Don't over-engineer.
What's the most common mistake candidates make?+
Ignoring edge cases: single characters, empty strings, strings with no repeating patterns. Also, misreading whether consecutive or non-consecutive characters should be grouped. Test your logic on the examples before submitting.
How do I code this in 15 minutes if I blank?+
Iterate through the string, count consecutive identical characters, append the count and character to a result string. Use a two-pointer or single-pass approach. Keep it simple and validate against the examples.
Is this still asked by Atlassian in 2024?+
Yes, the March 2024 report confirms it. String compression and manipulation remain core OA patterns. Expect variants on the same theme if you interview with them again.