【leetcode】稀疏数组搜索

 

int findString(char** words, int wordsSize, char* s){
    for (int i=0; i<wordsSize; i++)if (!strcmp(words[i],s)) return i;
    return -1;
}

 

posted @ 2020-09-05 13:15  温暖了寂寞  阅读(136)  评论(0编辑  收藏  举报