Skip to content

Commit 70af55c

Browse files
committed
Runtime: 0 ms (Top 100.0%) | Memory: 2.20 MB (Top 49.59%)
1 parent a3c249a commit 70af55c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Runtime: 0 ms (Top 100.0%) | Memory: 2.20 MB (Top 49.59%)
2+
3+
impl Solution {
4+
pub fn is_subsequence(s: String, t: String) -> bool {
5+
let mut iter = t.chars();
6+
for c in s.chars() {
7+
match iter.find(|&p| p == c) {
8+
Some(_) => (),
9+
None => return false
10+
}
11+
}
12+
true
13+
}
14+
}

0 commit comments

Comments
 (0)