1.3k1 分钟

#include <stdio.h> #include <stdlib.h> #include <string.h> void nex(char *s, int *next) { next[0] = 0; int now = 0, x = 1; while (x < strlen(s)) { if (s[now] == s[x]) { now += 1;
5141 分钟

再次验证我菜 bool isPalindrome(char * s){ char strss[500000]; int x=0,y=0; while(x< strlen(s)){ if((s[x]>='a'&&s[x]<='z')||(s[x]>='0'&&s[x]<='9')) strss[y]=s[x]; else if (s[x]>&#x
3641 分钟

int searchInsert(int* nums, int numsSize, int target){ if(numsSize ==1){ if(target<=nums[0]) return 0; return 1; } int left=0 , right= numsSize,mid =numsSize/2; while(right-left>1){ if(target>=nums[mid])