Integer to English Words

Convert a non-negative integer num to its English words representation.

Example 1
Inputnum = 123
Output"One Hundred Twenty Three"
The integer 123 is represented in English as "One Hundred Twenty Three".
Example 2
Inputnum = 12345
Output"Twelve Thousand Three Hundred Forty Five"
The integer 12345 is represented in English as "Twelve Thousand Three Hundred Forty Five".

Constraints

  • 0 <= num <= 2^31 - 1

Asked at 22 companies

</>

Your Solution

(Ctrl/Cmd + Enter)

Switching Language

Loading template...

Loading...

Sign in to save your progress

AI code evaluation

Get a correctness verdict, missed edge cases, and complexity analysis of your solution.

Sign in to evaluate