java.lang.Object
g0401_0500.s0423_reconstruct_original_digits_from_english.Solution

public class Solution extends Object
423 - Reconstruct Original Digits from English.<p>Medium</p> <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><strong>Example 1:</strong></p> <p><strong>Input:</strong> s = &ldquo;owoztneoer&rdquo;</p> <p><strong>Output:</strong> &ldquo;012&rdquo;</p> <p><strong>Example 2:</strong></p> <p><strong>Input:</strong> s = &ldquo;fviefuro&rdquo;</p> <p><strong>Output:</strong> &ldquo;45&rdquo;</p> <p><strong>Constraints:</strong></p> <ul> <li><code>1 <= s.length <= 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>
  • Constructor Details

    • Solution

      public Solution()
  • Method Details