摘要:
给定一个字符串,找到它的第一个不重复的字符,并返回它的索引。如果不存在,则返回 -1。 案例: s = "leetcode"返回 0. s = "loveleetcode",返回 2. 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/first-
阅读全文
posted @ 2020-04-09 23:12
cocobear9
阅读(358)
推荐(0)
摘要:
思路:水平横扫 #include<stdio.h>#include<stdlib.h>char * longestCommonPrefix(char ** strs, int strsSize);int main(){ char ** str ; char * temp ; int i=0,k,le
阅读全文
posted @ 2020-04-09 20:56
cocobear9
阅读(671)
推荐(0)
摘要:
#include<stdio.h>#include<stdlib.h> int main(){ char ** str ; int i=0,k ; str =(char**)malloc(sizeof(char)*1000); for(i=0;i<1000;i++) str[i]=(char*)ma
阅读全文
posted @ 2020-04-09 16:55
cocobear9
阅读(1291)
推荐(0)
摘要:
#include <stdio.h>char * stringCom(char** str,int size) ;int main(){ int i,len; char * temp ; char * a[]={"China","French","America","German"}; //1 ch
阅读全文
posted @ 2020-04-09 16:36
cocobear9
阅读(1344)
推荐(0)