Class Solution

  • All Implemented Interfaces:

    
    public final class Solution
    
                        

    423 - Reconstruct Original Digits from English.

    Medium

    Given a string s containing an out-of-order English representation of digits 0-9, return the digits in ascending order.

    Example 1:

    Input: s = "owoztneoer"

    Output: "012"

    Example 2:

    Input: s = "fviefuro"

    Output: "45"

    Constraints:

    • <code>1 <= s.length <= 10<sup>5</sup></code>

    • s[i] is one of the characters ["e","g","f","i","h","o","n","s","r","u","t","w","v","x","z"].

    • s is guaranteed to be valid.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Solution()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String originalDigits(String s)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait