摘要:
char * dayOfTheWeek(int day, int month, int year){ int i,j,days=0; char* weeks[]={"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "S 阅读全文
摘要:
int dayOfYear(char * date){ int day, year, month, sum=0; int monthArr[]={0,31,59,90,120,151,181,212,243,273,304,334,365}; sscanf(strtok(date,"-"), "%d 阅读全文
摘要:
int* decompressRLElist(int* nums, int numsSize, int* returnSize){ int* arr=(int*)calloc(10000,sizeof(int)); int i,j,pst=0; for(i=0; i<numsSize; i+=2){ 阅读全文
摘要:
char * freqAlphabets(char * s){ char arr[2000]={0}; int i,pst=1001, len=strlen(s); for(i=len-1; i>=0;){ if(s[i] == '#'){ arr[--pst]=(s[i-2]-'0')*10 + 阅读全文
摘要:
int* fraction(int* cont, int contSize, int* returnSize){ int* arr=(int*)calloc(sizeof(int),2); arr[0]=1; arr[1]=0; for (int i=contSize-1; i>=0; i--) { 阅读全文
摘要:
char * defangIPaddr(char * address){ int len = strlen(address); char* s = (char*)calloc(sizeof(char), len*2); char* buffer; buffer = strtok(address, " 阅读全文