Reported December 2024
Amazonstring

Find Password Strength

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

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

Amazon's December OA is asking you to grade password strength, and it's a string-parsing problem that looks simpler than it is. You're going to iterate through a password and count character types: uppercase, lowercase, digits, special characters. Most candidates get the counting right but miss the edge cases around what counts as 'special' and how the strength levels stack. StealthCoder is your safety net if you blank on the classification logic during the live OA.

Pattern and pitfall

The trick is understanding the strength scoring rules. You're counting four categories of characters, and the strength level depends on how many categories are present and sometimes the length. The common pitfall is assuming special characters are only punctuation: Amazon's definition usually includes anything that's not alphanumeric. You also need to handle the strength thresholds correctly. If the problem asks for a strength label (weak, medium, strong), map the score to the right bracket. The pattern is straightforward iteration and conditional logic, but the devil is in the rule definition. Read the problem text carefully for what 'special' means and what each strength tier requires.

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 Find Password Strength 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

⏵ The honest play

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

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

Find Password Strength FAQ

What counts as a special character?+

Usually anything that's not a letter or digit. ASCII symbols, spaces, punctuation all count. The problem statement will define it explicitly. Don't assume it's only punctuation. Read the examples.

Do I need to validate password length?+

Usually yes. Most strength scales have a minimum length requirement, often 8 characters. Short passwords may be flagged as weak even if they have all four character types. Check the examples.

Is this a hard problem?+

No. It's a sieve problem. You iterate once, count categories, apply rules. The logic is simple. The catch is precision: matching Amazon's exact strength definition. Read the problem twice before coding.

What if the password is empty or null?+

Handle it explicitly. Return weak or invalid. Amazon's examples will show the edge case. Don't guess. The problem statement defines the behavior for empty input.

Can I solve this in 48 hours with no prep?+

Yes. It's string iteration and counting. Spend 10 minutes understanding the strength rules, 15 minutes coding, 10 minutes testing against the examples. The hard part is reading requirements, not the algorithm.

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

OA at Amazon?
Invisible during screen share
Get it