java.lang.Object
g0201_0300.s0273_integer_to_english_words.Solution

public class Solution extends Object
273 - Integer to English Words.<p>Hard</p> <p>Convert a non-negative integer <code>num</code> to its English words representation.</p> <p><strong>Example 1:</strong></p> <p><strong>Input:</strong> num = 123</p> <p><strong>Output:</strong> &ldquo;One Hundred Twenty Three&rdquo;</p> <p><strong>Example 2:</strong></p> <p><strong>Input:</strong> num = 12345</p> <p><strong>Output:</strong> &ldquo;Twelve Thousand Three Hundred Forty Five&rdquo;</p> <p><strong>Example 3:</strong></p> <p><strong>Input:</strong> num = 1234567</p> <p><strong>Output:</strong> &ldquo;One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven&rdquo;</p> <p><strong>Example 4:</strong></p> <p><strong>Input:</strong> num = 1234567891</p> <p><strong>Output:</strong> &ldquo;One Billion Two Hundred Thirty Four Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety One&rdquo;</p> <p><strong>Constraints:</strong></p> <ul> <li><code>0 <= num <= 2<sup>31</sup> - 1</code></li> </ul>
  • Constructor Details

    • Solution

      public Solution()
  • Method Details

    • numberToWords

      public String numberToWords(int num)