class Solution {
public boolean isSubsequence(String s, String t) {
int startIndex = 0;
for(int i = 0; i<s.length(); i++){
char c=s.charAt(i);
boolean foundChar=false;
for(int j=startIndex; j<t.length(); j++){
if(c==t.charAt(j)){
startIndex=j+1;
foundChar=true;
break;
}
}
if (!foundChar) return false;
}
return true;
}
}