public static boolean isSub(String s,String tar){
int i = 0,j = 0;
while (i<s.length()&&j<tar.length()){
if(s.charAt(i) == tar.charAt(j)){
j++;
}
i++;
}
if(j == tar.length()) return true;
return false;
}