feat: 2025-10-23打卡

This commit is contained in:
wu xiangkai
2025-10-23 16:32:13 +08:00
parent 59f245dda7
commit f06095ad7e
9 changed files with 378 additions and 0 deletions

20
392.is-subsequence.java Normal file
View File

@@ -0,0 +1,20 @@
/*
* @lc app=leetcode id=392 lang=java
*
* [392] Is Subsequence
*/
// @lc code=start
class Solution {
public boolean isSubsequence(String s, String t) {
int i = 0;
for(int j = 0; j < t.length(); j++) {
if(i < s.length() && t.charAt(j) == s.charAt(i)) {
i++;
}
}
return i == s.length();
}
}
// @lc code=end