<p>Given a string <code>s</code> containing an out-of-order English representation of digits <code>0-9</code>, return <em>the digits in <strong>ascending</strong> order</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> s = "owoztneoer"
<strong>Output:</strong> "012"
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> s = "fviefuro"
<strong>Output:</strong> "45"
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
	<li><code>s[i]</code> is one of the characters <code>[&quot;e&quot;,&quot;g&quot;,&quot;f&quot;,&quot;i&quot;,&quot;h&quot;,&quot;o&quot;,&quot;n&quot;,&quot;s&quot;,&quot;r&quot;,&quot;u&quot;,&quot;t&quot;,&quot;w&quot;,&quot;v&quot;,&quot;x&quot;,&quot;z&quot;]</code>.</li>
	<li><code>s</code> is <strong>guaranteed</strong> to be valid.</li>
</ul>

class Solution {
    public:
    const string originalDigits(const string& s) {
        u_short count[10] {0};
        const uint sLen = s.size();
        for (uint i = 0; i < sLen; ++i) {
            switch (s[i]) {
                case 'z': ++count[0]; break;
                case 'w': ++count[2]; break;
                case 'u': ++count[4]; break;
                case 'x': ++count[6]; break;
                case 'g': ++count[8]; break;
                case 'h': ++count[3]; break;
                case 's': ++count[7]; break;
                case 'f': ++count[5]; break;
                case 'i': ++count[9]; break;
                case 'o': ++count[1]; break;
            }
        }
        count[3] -= count[8];
        count[7] -= count[6];
        count[5] -= count[4];
        count[9] -= count[5] + count[6] + count[8];
        count[1] -= count[0] + count[2] + count[4];
        string digits = "";
        // for (u_short i = 0; i < 10; ++i) digits += string(count[i], 48 + i);
        for (u_short i = 0; i < 10; ++i)
            while (count[i] > 0) {
                --count[i];
                digits.push_back(48 + i);
            }
        return digits;
    }
};
9700