Reported August 2024
Uberstring

Character Health

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

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

Uber's August 2024 OA threw 'Character Health' at candidates, and it's a string manipulation problem that looks simpler than it plays. You're probably staring at character parsing and wondering if there's a trick. There is. The pattern is string traversal with state tracking, and if you freeze mid-OA, StealthCoder reads the problem and feeds you the approach in real time so you can keep moving.

Pattern and pitfall

Character Health is about tracking character states as you iterate through a string. The trick is that you're not just counting or filtering. You're often managing health points, tracking transformations, or applying rules based on context. Common pitfall: greedy iteration without remembering previous state. You'll need to think about whether you're modifying as you go or collecting data first. The pattern is straightforward string iteration with conditional logic, but the implementation details trip people up under pressure. StealthCoder catches the pattern instantly and shows you the state machine you need to build.

Drill it cold or hedge it with StealthCoder. Either way, don't walk into the OA hoping you remember the trick.

If this hits your live OA

You can drill Character Health 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. Made for the candidate who got the OA invite this morning and has 72 hours, not six months.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

Uber reuses patterns across OAs. Made for the candidate who got the OA invite this morning and has 72 hours, not six months. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Character Health FAQ

Is this a greedy or dynamic-programming problem?+

Neither. It's pure string iteration with state tracking. You walk through the string once, maintain a health or state variable, and apply rules at each step. No backtracking, no optimization layers. Linear pass through the input.

What's the most common mistake candidates make?+

Forgetting to track state between iterations. You'll have health decreasing or characters transforming, and you need to update a running total or flag. Missing that step tanks your solution even if the logic is otherwise sound.

How much time should I spend on this in the OA?+

15-20 minutes if you see the pattern. Parse the problem, identify the state variable, write the loop, handle edge cases. If you're stuck after 10 minutes, StealthCoder gives you the framework and you pivot fast.

Do I need to optimize for space or time?+

Probably not. Single pass through the string, O(n) time, O(1) or O(n) space depending on output format. Uber isn't testing optimization chops here, just correct implementation under time pressure.

Is there a trick with special characters or edge cases?+

Likely. Empty strings, single characters, or repeated patterns might behave differently. Read the examples carefully. Edge cases usually define the state machine's bounds. If the problem statement is vague, the test cases tell the real story.

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

OA at Uber?
Invisible during screen share
Get it