mediumHash TableMathString 0 views

Reconstruct Original Digits from English

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

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

Reconstruct Original Digits from English diagram

Example 1

Input: s = "owoztneoer"

Output: "012"

Example 2

Input: s = "fviefuro"

Output: "45"

Constraints

  • 1 <= s.length <= 10^5
  • 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.

Hints

No hints yet.

Companies

No companies reported yet.

Discussion

Sign in to join the discussion.

Loading discussion...

Test results

No test cases yet.