public String findLongestWord(String s, List<String> d) {
if (s == null || s.length() == 0 || d.size() == 0) {
if (word.length() > s.length()) {
if (isSubsequence(s, word)) {
if (word.length() > res.length() || (word.length() == res.length() && word.compareTo(res) < 0)) {
public boolean isSubsequence(String s, String t) {
for (int i = 0; i < s.length() && tIndex < t.length(); i++) {
if (s.charAt(i) == t.charAt(tIndex)) {
return tIndex == t.length();