专栏名称: 每日一道算法题
学习算法是一种信仰,每天都需要坚持!
目录
相关文章推荐
九章算法  ·  一年被裁两次,一个底层码农的大落大起 ·  昨天  
九章算法  ·  「九点热评」Meta将被裁员工列入黑名单! ·  4 天前  
51好读  ›  专栏  ›  每日一道算法题

423. Reconstruct Original Digits from English

每日一道算法题  · 公众号  · 算法  · 2017-10-28 09:54

正文


Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order.


Note:

Input contains only lowercase English letters.

Input is guaranteed to be valid and can be transformed to its original digits. That means invalid inputs such as “abc” or “zerone” are not permitted.

Input length is less than 50,000.

Example 1:

Input: “owoztneoer”


Output: “012”

Example 2:

Input: “fviefuro”


Output: “45”


提示 提交代码后 需要用简洁的语言解释一下代码思路 ~







请到「今天看啥」查看全文