EASYasked at 2 companies

Strobogrammatic Number

A easy-tier problem at 48% community acceptance, tagged with Hash Table, Two Pointers, String. Reported in interviews at Meta and 1 others.

Founder's read

Strobogrammatic Number is an easy problem that shows up in assessments at Meta and Google, yet it catches candidates off guard because the trick isn't obvious from the problem statement alone. You're given a string and need to check if it reads the same when rotated 180 degrees. The catch: only certain digits (0, 1, 6, 8, 9) are valid when rotated, and some map to different digits (6 becomes 9, 9 becomes 6). At 47% acceptance, people are failing this because they either miss the rotation rules or don't use the two-pointer pattern correctly. If this problem lands in your live assessment and you blank on the digit-mapping trick, StealthCoder solves it invisibly in seconds.

Companies asking
2
Difficulty
EASY
Acceptance
48%

Companies that ask "Strobogrammatic Number"

If this hits your live OA

Strobogrammatic Number is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too.

Get StealthCoder
What this means

The algorithm is straightforward once you see it: use two pointers, one at each end of the string, and walk them toward the center. For each pair of digits, check if they form a valid strobogrammatic pair. A valid pair means both digits are in the rotatable set (0, 1, 6, 8, 9) and they map correctly (0 pairs with 0, 1 with 1, 6 with 9, 8 with 8, 9 with 6). The hash table lets you store the rotation mappings once. Most failures happen because candidates either forget to check that rotated digits actually match (treating it like a palindrome check instead), or they don't realize 6 and 9 are the mirror images of each other. This is a Hash Table and Two Pointers problem that also tests String manipulation. When you hit this live and the straightforward approach doesn't quite work, StealthCoder surfaces the rotation mapping and pointer logic instantly.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Strobogrammatic Number recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Strobogrammatic Number interview FAQ

Is Strobogrammatic Number actually easy, or are the acceptance numbers misleading?+

It's genuinely easy once you know the trick: certain digits rotate, some map to themselves, and 6 and 9 swap. The 47% acceptance rate reflects that many candidates don't immediately spot the digit-mapping logic or confuse it with a palindrome check. Knowing the rules upfront makes it trivial.

Does Google or Meta ask this as a screening or phone round problem?+

Both companies have asked it. It's typically an early-round problem because it's short to code and tests whether you can reason about string manipulation and pairing logic. It's a good signal for basic pattern recognition.

What's the trick I'm missing if I treat it like a palindrome?+

Palindromes ignore digit identity and just check if the string reads the same forwards and backwards. Strobogrammatic requires checking that each rotated digit actually maps to a valid pair. A string like '69' is NOT strobogrammatic because 6 and 9 don't satisfy the pairing rule when you rotate them and compare.

Should I use a hash table or just hardcode the rotation rules?+

A hash table is the cleanest approach because it makes the rotation mappings explicit and testable. Hardcoding the pairs in a few if-else branches works for easy problems, but the hash table pattern scales if the problem ever gets extended.

How does this problem relate to the other string and two-pointer problems I should know?+

It combines Hash Table (storing mappings), Two Pointers (comparing from both ends), and String manipulation. It's foundational for understanding how to validate symmetric or paired structures in strings, which shows up in palindrome variants and bracket-matching problems.

Want the actual problem statement? View "Strobogrammatic Number" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.