Microsoft Interview Question: Transform a Roman Number stor... |

Interview Question

Project Manager Interview(Student Candidate) Redmond, WA (US)

Transform a Roman Number stored as an integer into a string

  representation. Use any language. Provided methods for converting any single digit into it's respective character.

Interview Answer

1 Answer


Take the mod-10 of the number and convert to character. Push that on the string. Pass the number divided by 10 to the function recursively. Base case is 0, or single digit left.

Interview Candidate on 16-Nov-2009

Add Answers or Comments

To comment on this, Sign In or Sign Up.