1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/从英文中重建数字 [reconstruct-original-digits-from-english].html

28 lines
778 B
HTML
Raw Normal View History

2022-03-27 20:52:13 +08:00
<p>给你一个字符串 <code>s</code> ,其中包含字母顺序打乱的用英文单词表示的若干数字(<code>0-9</code>)。按 <strong>升序</strong> 返回原始的数字。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>s = "owoztneoer"
<strong>输出:</strong>"012"
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>s = "fviefuro"
<strong>输出:</strong>"45"
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
<li><code>s[i]</code><code>["e","g","f","i","h","o","n","s","r","u","t","w","v","x","z"]</code> 这些字符之一</li>
<li><code>s</code> 保证是一个符合题目要求的字符串</li>
</ul>