Integer to English Words
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
Convert a non-negative integer num into its English words representation.
Use Title Case words separated by single spaces, with no leading or trailing spaces, no hyphens, and no "and". Group the number in threes using the scale words Thousand, Million, and Billion, and write each group with Hundred and the words for 1-19 and the tens (Twenty through Ninety). Omit any group that is zero. 0 is written as "Zero".
Examples
Constraints
- 0 <= num <= 2^31 - 1
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.