摘要:
#define INT_MAX 2147483647 int cmp(const void* a, const void* b){ return *(int*)a - *(int*)b; // 快排构造递增序列 } int threeSumClosest(int* nums, int numsSiz 阅读全文
摘要:
int CompareByIncrease(const void* a, const void* b){ return *(int*)a - *(int*)b; // 快排构造递增序列 } int** threeSum(int* nums, int numsSize, int* returnSize 阅读全文
摘要:
/*JAVA*/ int[] values = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; String[] symbols = {"M","CM","D","CD","C","XC","L","XL","X","IX","V"," 阅读全文
摘要:
/*C++双指针*/ class Solution { public: int maxArea(vector<int>& height) { int l = 0, r = height.size() - 1; int ans = 0; while (l < r) { int area = min(h 阅读全文
摘要:
/* 方法2 */ int myAtoi(char *str) { long n = 0; int sign = 0; /* 跳过空格 */ while (*str == ' ') ++str; /* 判断符号 */ if(*str == '-' || *str == '+') { sign = ( 阅读全文
摘要:
char * convert(char * s, int numRows){ if (numRows < 2) return s; int i, j, pst = 0, len = strlen(s), cnt; char* retStr = (char*)calloc(len + 1, sizeo 阅读全文