EASYasked at 36 companies

Roman to Integer

A easy-tier problem at 65% community acceptance, tagged with Hash Table, Math, String. Reported in interviews at DeltaX and 35 others.

Founder's read

Roman to Integer is easy, but it shows up everywhere. DeltaX, IBM, Accenture, Bloomberg, and at least 31 other companies ask it. The acceptance rate sits at 65%, which sounds high until you realize half the candidates who submit it either hardcode the values wrong or forget the subtractive rule entirely. This is the kind of problem you don't want to discover live. If you blank on the IV/IX/XL logic mid-assessment, StealthCoder surfaces a working solution in seconds while the proctor sees nothing.

Companies asking
36
Difficulty
EASY
Acceptance
65%

Companies that ask "Roman to Integer"

If this hits your live OA

Roman to Integer 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 a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE.

Get StealthCoder
What this means

The trap is thinking Roman numerals are just a straightforward sum. They're not. When I appears before V or X, it's subtraction. When X appears before L or C, same rule. Most candidates either miss this entirely or botch the order of checks. The standard approach uses a hash table to store the seven base cases (I, V, X, L, C, D, M) and iterate right-to-left, subtracting when the current value is less than the previous. It's pure string parsing, no recursion needed, and runs in linear time. The real edge case isn't the math; it's discipline. One typo in your lookup table or one reversed comparison operator and you fail half the test cases. StealthCoder becomes insurance for the moment you second-guess yourself on a live OA.

Pattern tags

The honest play

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

Roman to Integer 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 a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Roman to Integer interview FAQ

Why is this on so many company assessments if it's marked easy?+

It's a filter. Easy problems reveal sloppy thinking. Forty companies, including Bloomberg and Accenture, use it because the subtractive rule catches rushed candidates. Acceptance sits at 65%, not 95%, because many submit broken solutions. It's not algorithmically hard; it's attention-hard.

What's the single biggest mistake candidates make?+

Forgetting or mishandling the subtractive cases (IV, IX, XL, XC, CD, CM). Some hardcode only the seven base symbols and fail on inputs like 44 or 99. Others check subtraction wrong. Right-to-left iteration with a running previous value catches all of them in one pass.

Do I need dynamic programming or recursion?+

No. This is a string iteration problem. Hash table plus a single pass, left-to-right or right-to-left, solves it. If you're thinking DP, you're overcomplicating it. The topics list includes Hash Table and String, not dynamic programming.

Is this still asked at places like DeltaX and SoFi?+

Yes. Both are in the top companies list. SoFi is a fintech screening shop and uses it as a baseline. It's not a curve problem, but it's consistent across tech and finance. Expect it in the early round, not the loop.

How do I avoid off-by-one or comparison errors live?+

Trace through one subtractive example (like IV = 4) on paper before you code. Then walk your loop on IV once more after you finish. That ritual takes 90 seconds and prevents the silent bugs that blow submissions. If you freeze mid-trace, StealthCoder gives you the correct solution to compare against.

Want the actual problem statement? View "Roman to Integer" 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.