leetcode_423.Reconstruct Original Digits from English ? 待解决

来源:互联网 发布:php和c的区别 编辑:程序博客网 时间:2024/06/16 01:42

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”

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

历史题目和总结见公众号「每日一道算法题」

https://leetcode.com/problems/reconstruct-original-digits-from-english/description/

思路

阅读全文
0 0
原创粉丝点击