<p>Convert a non-negative integer <code>num</code> to its English words representation.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> num = 123
<strong>Output:</strong> &quot;One Hundred Twenty Three&quot;
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> num = 12345
<strong>Output:</strong> &quot;Twelve Thousand Three Hundred Forty Five&quot;
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre>
<strong>Input:</strong> num = 1234567
<strong>Output:</strong> &quot;One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven&quot;
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>0 &lt;= num &lt;= 2<sup>31</sup> - 1</code></li>
</ul>

    // Create and initialize map<int, string> m1
    map<int, string>below10= {
        {1, "One "},
        {2, "Two "},
        {3, "Three "},
        {4, "Four "},
        {5, "Five "},
        {6, "Six "},
        {7, "Seven "},
        {8, "Eight "},
        {9, "Nine "}
    };

    // Create and initialize map<int, string> m2
    map<int, string> tens = {
        {2, "Twenty "},
        {3, "Thirty "},
        {4, "Forty "},
        {5, "Fifty "},
        {6, "Sixty "},
        {7, "Seventy "},
        {8, "Eighty "},
        {9, "Ninety "}
    };

    
    map<int, string> tenToNineteen = {
                {10, "Ten "}, {11, "Eleven "}, {12, "Twelve "}, {13, "Thirteen "},
                {14, "Fourteen "}, {15, "Fifteen "}, {16, "Sixteen "}, {17, "Seventeen "},
                {18, "Eighteen "}, {19, "Nineteen "}
            };

class Solution {
    string solve(int num){
        string ans="";
        
        if(num<10){
             ans=below10[num];
        }
        else if(num<100){

            if(num>=10 && num<=19)
            ans= tenToNineteen[num];
            else{
             ans= tens[num/10];
            if(num%10!=0)
            ans+=below10[num%10];
            }

            
        }
        else if(num<1000){
              ans= solve(num/100)+"Hundred ";
            if(num%100!=0)
            ans+=solve(num%100);
             
        }
        else if(num<1000000){
             ans= solve(num/1000)+"Thousand ";
            if(num%1000!=0)
            ans+=solve(num%1000);
             
        }
        else if(num<1000000000){
             ans=solve(num/1000000)+"Million ";
            if(num%1000000!=0)
            ans+=solve(num%1000000);
             
        }
        else{
            ans= solve(num/1000000000)+"Billion ";
            if(num%1000000000!=0)
            ans+=solve(num%1000000000);
             
        }
        
        return ans;
    }

public:
    string numberToWords(int num) {
        if(num==0) return "Zero";
        string temp=solve(num);
        temp.pop_back();
        return temp;

        



          
        
    }
};
9700