C语言 | Leetcode C语言题解之第521题最长特殊序列I
题目:
题解:
#define MAX(a, b) ((a) > (b) ? (a) : (b))
int findLUSlength(char * a, char * b) {
int lena = strlen(a);
int lenb = strlen(b);
return strcmp(a, b) != 0 ? MAX(lena, lenb) : -1;
}
题目:
题解:
#define MAX(a, b) ((a) > (b) ? (a) : (b))
int findLUSlength(char * a, char * b) {
int lena = strlen(a);
int lenb = strlen(b);
return strcmp(a, b) != 0 ? MAX(lena, lenb) : -1;
}