摘要: bool isPalindrome(int x){ if (x < 0) return false; int num = x; int arr[10] = {0}; int index = 0; while(num!=0) { arr[index] = num % 10; num /= 10; in 阅读全文
posted @ 2020-08-13 18:45 温暖了寂寞 阅读(104) 评论(0) 推荐(0) 编辑
摘要: /** * Note: The returned array must be malloced, assume caller calls free(). */ int* twoSum(int* nums, int numsSize, int target, int* returnSize){ //i 阅读全文
posted @ 2020-08-13 18:23 温暖了寂寞 阅读(107) 评论(0) 推荐(0) 编辑
摘要: int reverse(int x){ int arr[32] = {0}; int bit = 0; long long Integer = 0; while(x) { arr[bit] = x % 10; x = x / 10; bit++; } int Loopbit = bit; bit - 阅读全文
posted @ 2020-08-13 18:22 温暖了寂寞 阅读(168) 评论(0) 推荐(0) 编辑