Reported August 2024
Onixstring

Get String to Remove

Reported by candidates from Onix's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Onix OA. Under 2s to a working solution.
Founder's read

Onix's August OA included a string manipulation problem where you need to identify which characters to strip from one string to match another. This is a pattern recognition problem dressed up as a removal task. The trick is figuring out the minimal or optimal set of characters to delete, not brute-forcing every possibility. If you blank on the exact approach, StealthCoder will read the problem live and show you the standard string-matching pattern in real time.

Pattern and pitfall

The core pattern here is likely a subsequence or character deletion problem. You're given two strings and need to find what to remove from one to get the other, or identify which characters form the 'removal set.' This usually hinges on two-pointer traversal or dynamic programming to track which characters must go. The pitfall is overthinking it as a complex transformation when it's really about matching character frequencies or finding the longest common subsequence. StealthCoder becomes your safety net if you freeze on the DP formulation during the live assessment, scanning the exact problem statement and feeding you the pattern.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Get String to Remove 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 StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as longest common subsequence. If you have time before the OA, drill that.

⏵ The honest play

You've seen the question. Make sure you actually pass Onix's OA.

Onix 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.

Get String to Remove FAQ

Is this asking for the characters I should delete, or the result string after deletion?+

Confirm from the problem statement. Typically these ask for either the removal set (which chars to delete) or the final cleaned string. The approach differs slightly, but both use the same core matching logic. Read the output format carefully.

Do I need to preserve order when removing characters?+

Almost certainly yes. You're not rearranging, just deleting. This is why two-pointer or subsequence DP matters. If order didn't matter, the problem would say so explicitly.

What if multiple solutions exist?+

The problem will specify 'minimal' or 'lexicographically smallest' or similar. If it doesn't, assume any valid removal is accepted. Check the examples for the tiebreaker rule.

Is this a greedy problem or does it need DP?+

Usually DP or careful pointer traversal. Greedy rarely works cleanly for string removal because one early choice can block later matches. Test greedy on the examples first, but don't bet the OA on it.

How do I prepare in 48 hours?+

Know the longest common subsequence pattern. Practice one two-pointer string problem and one DP string problem. Onix typically doesn't require advanced tricks, just solid pattern recognition and clean code.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Onix.

OA at Onix?
Invisible during screen share
Get it