423. Reconstruct Original Digits from English Medium
1/**
2 * [423] Reconstruct Original Digits from English
3 *
4 * Given a string s containing an out-of-order English representation of digits 0-9, return the digits in ascending order.
5 *
6 * Example 1:
7 * Input: s = "owoztneoer"
8 * Output: "012"
9 * Example 2:
10 * Input: s = "fviefuro"
11 * Output: "45"
12 *
13 * Constraints:
14 *
15 * 1 <= s.length <= 10^5
16 * s[i] is one of the characters ["e","g","f","i","h","o","n","s","r","u","t","w","v","x","z"].
17 * s is guaranteed to be valid.
18 *
19 */
20pub struct Solution {}
21
22// problem: https://leetcode.com/problems/reconstruct-original-digits-from-english/
23// discuss: https://leetcode.com/problems/reconstruct-original-digits-from-english/discuss/?currentPage=1&orderBy=most_votes&query=
24
25// submission codes start here
26
27impl Solution {
28 pub fn original_digits(s: String) -> String {
29 String::new()
30 }
31}
32
33// submission codes end
34
35#[cfg(test)]
36mod tests {
37 use super::*;
38
39 #[test]
40 fn test_423() {
41 }
42}
43
Back
© 2025 bowen.ge All Rights Reserved.